mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
🎨 Format Python code with Black
This commit is contained in:
parent
a349fc0334
commit
c2d69f7f84
1 changed files with 7 additions and 2 deletions
|
@ -688,12 +688,17 @@ def _get_services():
|
|||
]
|
||||
for name in services_with_package_condition:
|
||||
package = services[name]["ignore_if_package_is_not_installed"]
|
||||
if check_output(f"dpkg-query --show --showformat='${{db:Status-Status}}' '{package}' 2>/dev/null || true") != "installed":
|
||||
if (
|
||||
check_output(
|
||||
f"dpkg-query --show --showformat='${{db:Status-Status}}' '{package}' 2>/dev/null || true"
|
||||
)
|
||||
!= "installed"
|
||||
):
|
||||
del services[name]
|
||||
|
||||
php_fpm_versions = check_output(
|
||||
r"dpkg --list | grep -P 'ii php\d.\d-fpm' | awk '{print $2}' | grep -o -P '\d.\d' || true",
|
||||
cwd="/tmp"
|
||||
cwd="/tmp",
|
||||
)
|
||||
php_fpm_versions = [v for v in php_fpm_versions.split("\n") if v.strip()]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue