1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

Small cleanup of autoupdate try..except..else

This commit is contained in:
Salamandar 2024-02-11 20:08:37 +01:00
parent eea62e4236
commit 9200caee2c

View file

@ -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())}")