mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[CI] Format code with Black
This commit is contained in:
parent
deda909eba
commit
7373971573
2 changed files with 8 additions and 4 deletions
|
@ -87,8 +87,8 @@ class MyMigration(Migration):
|
||||||
# and the code inside /usr/bin/deb-systemd-invoke to see how it calls /usr/sbin/policy-rc.d ...
|
# and the code inside /usr/bin/deb-systemd-invoke to see how it calls /usr/sbin/policy-rc.d ...
|
||||||
# and also invoke-rc.d ...
|
# and also invoke-rc.d ...
|
||||||
write_to_file(
|
write_to_file(
|
||||||
'/usr/sbin/policy-rc.d',
|
"/usr/sbin/policy-rc.d",
|
||||||
'#!/bin/bash\n[[ "$1" =~ "nginx" ]] && [[ "$2" == "restart" ]] && exit 101 || exit 0'
|
'#!/bin/bash\n[[ "$1" =~ "nginx" ]] && [[ "$2" == "restart" ]] && exit 101 || exit 0',
|
||||||
)
|
)
|
||||||
os.system("chmod +x /usr/sbin/policy-rc.d")
|
os.system("chmod +x /usr/sbin/policy-rc.d")
|
||||||
|
|
||||||
|
@ -260,7 +260,6 @@ class MyMigration(Migration):
|
||||||
raw_msg=True,
|
raw_msg=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
postupgradecmds = f"apt-mark auto {' '.join(basephp74packages_to_install)}\n"
|
postupgradecmds = f"apt-mark auto {' '.join(basephp74packages_to_install)}\n"
|
||||||
postupgradecmds += "rm -f /usr/sbin/policy-rc.d\n"
|
postupgradecmds += "rm -f /usr/sbin/policy-rc.d\n"
|
||||||
postupgradecmds += "echo 'Restarting nginx...' >&2\n"
|
postupgradecmds += "echo 'Restarting nginx...' >&2\n"
|
||||||
|
|
|
@ -448,7 +448,12 @@ def _list_upgradable_apps():
|
||||||
|
|
||||||
@is_unit_operation()
|
@is_unit_operation()
|
||||||
def tools_upgrade(
|
def tools_upgrade(
|
||||||
operation_logger, target=None, apps=False, system=False, allow_yunohost_upgrade=True, postupgradecmds=""
|
operation_logger,
|
||||||
|
target=None,
|
||||||
|
apps=False,
|
||||||
|
system=False,
|
||||||
|
allow_yunohost_upgrade=True,
|
||||||
|
postupgradecmds="",
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Update apps & package cache, then display changelog
|
Update apps & package cache, then display changelog
|
||||||
|
|
Loading…
Add table
Reference in a new issue