Skip to content

Commit 6ce8bb8

Browse files
authored
Merge pull request #2194 from ameypd/develop
Fixes #1862, added way to see full stack trace on error situations
2 parents fcf6cf6 + fc0d53a commit 6ce8bb8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

examples/client_example/client_example.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import logging
99
import os
1010
import shutil
11+
import traceback
1112
from pathlib import Path
1213

1314
from tuf.api.exceptions import DownloadError, RepositoryError
@@ -75,6 +76,8 @@ def download(target: str) -> bool:
7576

7677
except (OSError, RepositoryError, DownloadError) as e:
7778
print(f"Failed to download target {target}: {e}")
79+
if logging.root.level < logging.ERROR:
80+
traceback.print_exc()
7881
return False
7982

8083
return True

0 commit comments

Comments
 (0)