fix error message on fetch/pull/checkout failure

This commit is contained in:
Daniele Trifirò
2022-08-23 23:07:01 +03:00
committed by Ruslan Kuprieiev
parent 6477ade557
commit c69c46d08c
+2 -1
View File
@@ -43,7 +43,8 @@ class CmdDataPull(CmdDataBase):
)
self.log_summary(stats)
except (CheckoutError, DvcException) as exc:
self.log_summary(getattr(exc, "stats", {}))
if stats := getattr(exc, "stats", {}):
self.log_summary(stats)
logger.exception("failed to pull data from the cloud")
return 1