diff --git a/src/yunohost/app.py b/src/yunohost/app.py index bde39685c..3e7fb0c3f 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -464,7 +464,18 @@ def app_change_url(operation_logger, auth, app, domain, path): if (domain, path) == (old_domain, old_path): raise YunohostError("app_change_url_identical_domains", domain=domain, path=path) - _get_conflicting_apps(auth, domain, path) + # Check the url is available + conflicts = _get_conflicting_apps(auth, domain, path) + if conflicts: + apps = [] + for path, app_id, app_label in conflicts: + apps.append(" * {domain:s}{path:s} → {app_label:s} ({app_id:s})".format( + domain=domain, + path=path, + app_id=app_id, + app_label=app_label, + )) + raise YunohostError('app_location_unavailable', apps="\n".join(apps)) manifest = json.load(open(os.path.join(APPS_SETTING_PATH, app, "manifest.json")))