diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 5bd9d7f08..7d5d36c4d 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -60,12 +60,6 @@ APPS_CATALOG_CRON_PATH = "/etc/cron.daily/yunohost-fetch-apps-catalog" APPS_CATALOG_API_VERSION = 2 APPS_CATALOG_DEFAULT_URL = "https://app.yunohost.org/default" -re_github_repo = re.compile( - r'^(http[s]?://|git@)github.com[/:]' - '(?P[\w\-_]+)/(?P[\w\-_]+)(.git)?' - '(/tree/(?P.+))?' -) - re_app_instance_name = re.compile( r'^(?P[\w-]+?)(__(?P[1-9][0-9]*))?$' ) @@ -2242,10 +2236,8 @@ def _fetch_app_from_git(app): if ('@' in app) or ('http://' in app) or ('https://' in app): url = app branch = 'master' - tree_index = url.rfind('/tree/') - if tree_index > 0: - url = url[:tree_index] - branch = app[tree_index + 6:] + if "/tree/" in url: + url, branch = url.split("/tree/", 1) revision = 'HEAD' else: app_dict = _load_apps_catalog()["apps"]