From bca2af3391a815873a7b63084d941640e0dbadf0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 21 Feb 2019 23:37:19 +0100 Subject: [PATCH] [microdecision] I'm sick of those people who end up with app repo being added as app list and messing up everything -.- --- src/yunohost/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 302049ed8..5f5d9f8f9 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -97,6 +97,9 @@ def app_fetchlist(url=None, name=None): name -- Name of the list url -- URL of remote JSON list """ + if not url.endswith(".json"): + raise YunohostError("This is not a valid application list url. It should end with .json.") + # If needed, create folder where actual appslists are stored if not os.path.exists(REPO_PATH): os.makedirs(REPO_PATH)