Merge pull request #1884 from YunoHost/actions/black

Format Python code with Black
This commit is contained in:
Alexandre Aubin 2024-06-29 20:05:21 +02:00 committed by GitHub
commit 28603da4f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()]