'Helper that logs exceptions that occurred during DoUpload.
Args:
exception: An exception that was thrown during DoUpload.'

@staticmethod
def _LogDoUploadException(exception):

    def InstanceOf(tipe):
        return isinstance(exception, tipe)
    if InstanceOf(KeyboardInterrupt):
        logging.info('User    interrupted.    Aborting.')
    elif InstanceOf(urllib2.HTTPError):
        logging.info('HTTP    Error    (%s)', exception)
    elif InstanceOf(CannotStartServingError):
        logging.error(exception.message)
    else:
        logging.exception('An    unexpected    error    occurred.    Aborting.')
