Merge pull request #1870 from mroutis/fix-1869

logger: use exception instead of error
This commit is contained in:
Ruslan Kuprieiev
2019-04-11 00:35:50 +03:00
committed by GitHub
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ class RemoteHTTP(RemoteBase):
except Exception:
msg = "failed to download '{}'".format(from_info["path"])
logger.error(msg)
logger.exception(msg)
continue
if not no_progress_bar:
+3 -3
View File
@@ -272,7 +272,7 @@ class RemoteLOCAL(RemoteBase):
d = json.load(fd)
except Exception:
msg = "Failed to load dir cache '{}'"
logger.error(msg.format(os.path.relpath(path)))
logger.exception(msg.format(os.path.relpath(path)))
return []
if not isinstance(d, list):
@@ -511,7 +511,7 @@ class RemoteLOCAL(RemoteBase):
copyfile(from_info["path"], tmp_file, name=name)
os.rename(tmp_file, to_info["path"])
except Exception:
logger.error(
logger.exception(
"failed to upload '{}' to '{}'".format(
from_info["path"], to_info["path"]
)
@@ -555,7 +555,7 @@ class RemoteLOCAL(RemoteBase):
move(tmp_file, to_info["path"])
except Exception:
logger.error(
logger.exception(
"failed to download '{}' to '{}'".format(
from_info["path"], to_info["path"]
)
+2 -2
View File
@@ -188,7 +188,7 @@ class RemoteS3(RemoteBase):
)
except Exception:
msg = "failed to upload '{}'".format(from_info["path"])
logger.error(msg)
logger.exception(msg)
continue
progress.finish_target(name)
@@ -246,7 +246,7 @@ class RemoteS3(RemoteBase):
msg = "failed to download '{}/{}'".format(
from_info["bucket"], from_info["path"]
)
logger.error(msg)
logger.exception(msg)
continue
move(tmp_file, to_info["path"])
+1 -1
View File
@@ -160,7 +160,7 @@ class RemoteSSH(RemoteBase):
from_info["path"], to_info["path"], progress_title=name
)
except Exception:
logger.error(
logger.exception(
"failed to download '{host}/{path}' to '{dest}'".format(
host=from_info["host"],
path=from_info["path"],