Skip to content

Commit

Permalink
Merge pull request #2194 from ameypd/develop
Browse files Browse the repository at this point in the history
Fixes #1862, added way to see full stack trace on error situations
  • Loading branch information
jku authored Nov 25, 2022
2 parents fcf6cf6 + fc0d53a commit 6ce8bb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/client_example/client_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import logging
import os
import shutil
import traceback
from pathlib import Path

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

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

return True
Expand Down

0 comments on commit 6ce8bb8

Please sign in to comment.