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

autoupdate_app_sources: more human-friendly messages when data type mismatch between old and new infos

This commit is contained in:
Alexandre Aubin 2023-07-24 20:59:46 +02:00
parent 8c7798d0a1
commit 906eb7b1bc

View file

@ -179,6 +179,10 @@ class AppAutoUpdater:
print("Up to date") print("Up to date")
continue 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: if isinstance(new_asset_urls, str) and infos["url"] == new_asset_urls:
print(f"URL for asset {source} is up to date") print(f"URL for asset {source} is up to date")
continue continue