From c69c46d08c2174957feabe4170d4e598dcec76cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Trifir=C3=B2?= Date: Wed, 3 Aug 2022 19:34:51 +0200 Subject: [PATCH] fix error message on fetch/pull/checkout failure --- dvc/commands/data_sync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dvc/commands/data_sync.py b/dvc/commands/data_sync.py index 22197a894..13596d9a0 100644 --- a/dvc/commands/data_sync.py +++ b/dvc/commands/data_sync.py @@ -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