mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 07:18:28 +01:00
Merge pull request #1870 from mroutis/fix-1869
logger: use exception instead of error
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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"])
|
||||
|
||||
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user