From 6a829ebbacba0fec2d19d6eb057c2d70a08061d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 11 Feb 2024 20:08:37 +0100 Subject: [PATCH] Small cleanup of autoupdate try..except..else --- autoupdate_app_sources/autoupdate_app_sources.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/autoupdate_app_sources/autoupdate_app_sources.py b/autoupdate_app_sources/autoupdate_app_sources.py index 62b4646..5a52e4f 100644 --- a/autoupdate_app_sources/autoupdate_app_sources.py +++ b/autoupdate_app_sources/autoupdate_app_sources.py @@ -479,16 +479,14 @@ def main() -> None: with logging_redirect_tqdm(): for app in tqdm.tqdm(apps_to_run_auto_update_for(), ascii=" ยท#"): try: - updated = AppAutoUpdater(app).run() - except Exception as e: + if AppAutoUpdater(app).run(): + apps_updated.append(app) + except Exception: import traceback t = traceback.format_exc() apps_failed[app] = t print(t) - else: - if updated: - apps_updated.append(app) if apps_failed: print(f"Apps failed: {', '.join(apps_failed.keys())}")