Skip to content

Fix call to format_exception() download project fails #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions mergin/client_pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ def download_project_is_running(job):
"""
for future in job.futures:
if future.done() and future.exception() is not None:
job.mp.log.error(
"Error while downloading project: " + "".join(traceback.format_exception(future.exception()))
)
exc = future.exception()
traceback_lines = traceback.format_exception(type(exc), exc, exc.__traceback__)
job.mp.log.error("Error while downloading project: " + "".join(traceback_lines))
job.mp.log.info("--- download aborted")
job.failure_log_file = _cleanup_failed_download(job.directory, job.mp)
raise future.exception()
Expand All @@ -225,9 +225,9 @@ def download_project_finalize(job):
# make sure any exceptions from threads are not lost
for future in job.futures:
if future.exception() is not None:
job.mp.log.error(
"Error while downloading project: " + "".join(traceback.format_exception(future.exception()))
)
exc = future.exception()
traceback_lines = traceback.format_exception(type(exc), exc, exc.__traceback__)
job.mp.log.error("Error while downloading project: " + "".join(traceback_lines))
job.mp.log.info("--- download aborted")
job.failure_log_file = _cleanup_failed_download(job.directory, job.mp)
raise future.exception()
Expand Down