Fix upload message

This commit is contained in:
allegroai 2020-09-09 22:08:22 +03:00
parent 33f42def54
commit fede603a7b

View File

@ -916,7 +916,9 @@ class StorageHelper(object):
self._log.error("Calling upload callback when starting upload: %s" % str(e)) self._log.error("Calling upload callback when starting upload: %s" % str(e))
if verbose: if verbose:
msg = 'Starting upload: {} => {}{}'.format( msg = 'Starting upload: {} => {}{}'.format(
src_path, self._container.name if self._container else '', object_name) src_path,
(self._container.name if self._container.name.endswith('/') else self._container.name + '/')
if self._container and self._container.name else '', object_name)
if object_name.startswith('file://') or object_name.startswith('/'): if object_name.startswith('file://') or object_name.startswith('/'):
self._log.debug(msg) self._log.debug(msg)
else: else:
@ -932,6 +934,7 @@ class StorageHelper(object):
if last_ex: if last_ex:
self._log.error("Exception encountered while uploading %s" % str(last_ex)) self._log.error("Exception encountered while uploading %s" % str(last_ex))
if cb:
try: try:
cb(False) cb(False)
except Exception as e: except Exception as e: