mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1563 from YunoHost/ci-format-dev
[CI] Format code with Black
This commit is contained in:
commit
2b6465d36d
3 changed files with 13 additions and 4 deletions
11
src/app.py
11
src/app.py
|
@ -1595,7 +1595,13 @@ def app_ssowatconf():
|
||||||
}
|
}
|
||||||
redirected_urls = {}
|
redirected_urls = {}
|
||||||
|
|
||||||
apps_using_remote_user_var_in_nginx = check_output('grep -nri \'$remote_user\' /etc/yunohost/apps/*/conf/*nginx*conf | awk -F/ \'{print $5}\' || true').strip().split("\n")
|
apps_using_remote_user_var_in_nginx = (
|
||||||
|
check_output(
|
||||||
|
"grep -nri '$remote_user' /etc/yunohost/apps/*/conf/*nginx*conf | awk -F/ '{print $5}' || true"
|
||||||
|
)
|
||||||
|
.strip()
|
||||||
|
.split("\n")
|
||||||
|
)
|
||||||
|
|
||||||
for app in _installed_apps():
|
for app in _installed_apps():
|
||||||
|
|
||||||
|
@ -1638,7 +1644,8 @@ def app_ssowatconf():
|
||||||
app_id = perm_name.split(".")[0]
|
app_id = perm_name.split(".")[0]
|
||||||
|
|
||||||
permissions[perm_name] = {
|
permissions[perm_name] = {
|
||||||
"use_remote_user_var_in_nginx_conf": app_id in apps_using_remote_user_var_in_nginx,
|
"use_remote_user_var_in_nginx_conf": app_id
|
||||||
|
in apps_using_remote_user_var_in_nginx,
|
||||||
"users": perm_info["corresponding_users"],
|
"users": perm_info["corresponding_users"],
|
||||||
"label": perm_info["label"],
|
"label": perm_info["label"],
|
||||||
"show_tile": perm_info["show_tile"]
|
"show_tile": perm_info["show_tile"]
|
||||||
|
|
|
@ -417,7 +417,7 @@ def tools_upgrade(operation_logger, target=None):
|
||||||
if target not in ["apps", "system"]:
|
if target not in ["apps", "system"]:
|
||||||
raise YunohostValidationError(
|
raise YunohostValidationError(
|
||||||
"Uhoh ?! tools_upgrade should have 'apps' or 'system' value for argument target",
|
"Uhoh ?! tools_upgrade should have 'apps' or 'system' value for argument target",
|
||||||
raw_msg=True
|
raw_msg=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -479,7 +479,9 @@ class ConfigPanel:
|
||||||
|
|
||||||
# Check TOML config panel is in a supported version
|
# Check TOML config panel is in a supported version
|
||||||
if float(toml_config_panel["version"]) < CONFIG_PANEL_VERSION_SUPPORTED:
|
if float(toml_config_panel["version"]) < CONFIG_PANEL_VERSION_SUPPORTED:
|
||||||
logger.error(f"Config panels version {toml_config_panel['version']} are not supported")
|
logger.error(
|
||||||
|
f"Config panels version {toml_config_panel['version']} are not supported"
|
||||||
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Transform toml format into internal format
|
# Transform toml format into internal format
|
||||||
|
|
Loading…
Add table
Reference in a new issue