mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Fixes #1862, added way to see full stack trace on error situations
Signed-off-by: ameypd <h20220013@goa.bits-pilani.ac.in>
This commit is contained in:
parent
fcf6cf679f
commit
fc0d53aae2
1 changed files with 3 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import traceback
|
||||
from pathlib import Path
|
||||
|
||||
from tuf.api.exceptions import DownloadError, RepositoryError
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue