From 906eb7b1bc2d6af7d0cc7acf796f22acac6d1611 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 24 Jul 2023 20:59:46 +0200 Subject: [PATCH] autoupdate_app_sources: more human-friendly messages when data type mismatch between old and new infos --- tools/autoupdate_app_sources/autoupdate_app_sources.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/autoupdate_app_sources/autoupdate_app_sources.py b/tools/autoupdate_app_sources/autoupdate_app_sources.py index a0a4def2..5d2080c1 100644 --- a/tools/autoupdate_app_sources/autoupdate_app_sources.py +++ b/tools/autoupdate_app_sources/autoupdate_app_sources.py @@ -179,6 +179,10 @@ class AppAutoUpdater: print("Up to date") continue + if (isinstance(new_asset_urls, dict) and isinstance(infos.get("url"), str)) \ + or (isinstance(new_asset_urls, str) and not isinstance(infos.get("url"), str)): + raise Exception(f"It looks like there's an inconsistency between the old asset list and the new ones ... one is arch-specific, the other is not ... Did you forget to define arch-specific regexes ? ... New asset url is/are : {new_asset_urls}") + if isinstance(new_asset_urls, str) and infos["url"] == new_asset_urls: print(f"URL for asset {source} is up to date") continue