Skip to content

Bulk asynchronous downloader for multiple file hosts

Fix error code logging system (#547)

Jacob7b2ac66a25a3
diff --git a/cyberdrop_dl/managers/progress_manager.py b/cyberdrop_dl/managers/progress_manager.py
index b8df26464..407a2800f 100644
--- a/cyberdrop_dl/managers/progress_manager.py
+++ b/cyberdrop_dl/managers/progress_manager.py
@@ -124,7 +124,7 @@ def log_failures(failures: list[UiFailureTotal], title: str = "Failures:", last_
log_green(" None")
return 0
error_padding = last_padding
- error_codes = (f.error_code for f in failures if f.error_code is not None)
+ error_codes = [f.error_code for f in failures if f.error_code is not None]
if error_codes:
error_padding = max(len(str(max(error_codes))), error_padding)
for f in failures:
diff --git a/cyberdrop_dl/ui/progress/statistic_progress.py b/cyberdrop_dl/ui/progress/statistic_progress.py
index 4ac3e90c9..9266e8ac0 100644
--- a/cyberdrop_dl/ui/progress/statistic_progress.py
+++ b/cyberdrop_dl/ui/progress/statistic_progress.py
@@ -33,7 +33,7 @@ class UiFailureTotal(NamedTuple):
@classmethod
def from_pair(cls, full_msg: str, count: int) -> UiFailureTotal:
parts = full_msg.split(" ", 1)
- if len(parts) > 1 and parts[0].isdigit:
+ if len(parts) > 1 and parts[0].isdigit():
error_code, msg = parts
return cls(full_msg, count, int(error_code), msg)
return cls(full_msg, count, None, full_msg)