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
7aa840a956
commit
bbcbc411ea
1 changed files with 21 additions and 9 deletions
|
@ -7,7 +7,12 @@ from moulinette.utils.log import getActionLogger
|
||||||
from moulinette.utils.process import check_output, call_async_output
|
from moulinette.utils.process import check_output, call_async_output
|
||||||
from moulinette.utils.filesystem import read_file, rm
|
from moulinette.utils.filesystem import read_file, rm
|
||||||
|
|
||||||
from yunohost.tools import Migration, tools_update, tools_upgrade, _apt_log_line_is_relevant
|
from yunohost.tools import (
|
||||||
|
Migration,
|
||||||
|
tools_update,
|
||||||
|
tools_upgrade,
|
||||||
|
_apt_log_line_is_relevant,
|
||||||
|
)
|
||||||
from yunohost.app import unstable_apps
|
from yunohost.app import unstable_apps
|
||||||
from yunohost.regenconf import manually_modified_files, _force_clear_hashes
|
from yunohost.regenconf import manually_modified_files, _force_clear_hashes
|
||||||
from yunohost.utils.filesystem import free_space_in_directory
|
from yunohost.utils.filesystem import free_space_in_directory
|
||||||
|
@ -182,12 +187,14 @@ class MyMigration(Migration):
|
||||||
"zip",
|
"zip",
|
||||||
]
|
]
|
||||||
|
|
||||||
cmd = "apt show '*-ynh-deps' 2>/dev/null" \
|
cmd = (
|
||||||
" | grep Depends" \
|
"apt show '*-ynh-deps' 2>/dev/null"
|
||||||
f" | grep -o -E \"php7.3-({'|'.join(php73packages_suffixes)})\"" \
|
" | grep Depends"
|
||||||
" | sort | uniq" \
|
f" | grep -o -E \"php7.3-({'|'.join(php73packages_suffixes)})\""
|
||||||
" | sed 's/php7.3/php7.4/g'" \
|
" | sort | uniq"
|
||||||
" || true"
|
" | sed 's/php7.3/php7.4/g'"
|
||||||
|
" || true"
|
||||||
|
)
|
||||||
|
|
||||||
php74packages_to_install = [
|
php74packages_to_install = [
|
||||||
"php7.4-fpm",
|
"php7.4-fpm",
|
||||||
|
@ -211,7 +218,9 @@ class MyMigration(Migration):
|
||||||
)
|
)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
# FIXME: i18n once this is stable?
|
# FIXME: i18n once this is stable?
|
||||||
raise YunohostError("Failed to force the install of php dependencies ?", raw_msg=True)
|
raise YunohostError(
|
||||||
|
"Failed to force the install of php dependencies ?", raw_msg=True
|
||||||
|
)
|
||||||
|
|
||||||
# Clean the mess
|
# Clean the mess
|
||||||
logger.info(m18n.n("migration_0021_cleaning_up"))
|
logger.info(m18n.n("migration_0021_cleaning_up"))
|
||||||
|
@ -235,7 +244,10 @@ class MyMigration(Migration):
|
||||||
logger.info("Simulating upgrade...")
|
logger.info("Simulating upgrade...")
|
||||||
if os.system(cmd) == 0:
|
if os.system(cmd) == 0:
|
||||||
# FIXME: i18n once this is stable?
|
# FIXME: i18n once this is stable?
|
||||||
raise YunohostError("The upgrade cannot be completed, because some app dependencies would need to be removed?", raw_msg=True)
|
raise YunohostError(
|
||||||
|
"The upgrade cannot be completed, because some app dependencies would need to be removed?",
|
||||||
|
raw_msg=True,
|
||||||
|
)
|
||||||
|
|
||||||
tools_upgrade(target="system")
|
tools_upgrade(target="system")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue