mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1411 from YunoHost/ci-format-dev
[CI] Format code with Black
This commit is contained in:
commit
7e887829f6
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 also invoke-rc.d ...
|
||||
write_to_file(
|
||||
'/usr/sbin/policy-rc.d',
|
||||
'#!/bin/bash\n[[ "$1" =~ "nginx" ]] && [[ "$2" == "restart" ]] && exit 101 || exit 0'
|
||||
"/usr/sbin/policy-rc.d",
|
||||
'#!/bin/bash\n[[ "$1" =~ "nginx" ]] && [[ "$2" == "restart" ]] && exit 101 || exit 0',
|
||||
)
|
||||
os.system("chmod +x /usr/sbin/policy-rc.d")
|
||||
|
||||
|
@ -260,7 +260,6 @@ class MyMigration(Migration):
|
|||
raw_msg=True,
|
||||
)
|
||||
|
||||
|
||||
postupgradecmds = f"apt-mark auto {' '.join(basephp74packages_to_install)}\n"
|
||||
postupgradecmds += "rm -f /usr/sbin/policy-rc.d\n"
|
||||
postupgradecmds += "echo 'Restarting nginx...' >&2\n"
|
||||
|
|
|
@ -448,7 +448,12 @@ def _list_upgradable_apps():
|
|||
|
||||
@is_unit_operation()
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue