mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] service_status returns different type of data if you one or multiple services
This commit is contained in:
parent
e7ec6d9680
commit
bf3ffc3e7d
1 changed files with 2 additions and 2 deletions
|
@ -2610,10 +2610,10 @@ def _check_services_status_for_app(services):
|
|||
# (added by apps) and because those are the most popular
|
||||
# services
|
||||
service_filter = ["nginx", "php7.0-fpm", "mysql", "postfix"]
|
||||
services = [s for s in services if s in service_filter]
|
||||
services = [str(s) for s in services if s in service_filter]
|
||||
|
||||
# List services currently down and raise an exception if any are found
|
||||
faulty_services = [s for s, infos in service_status(services).items() if infos["active"] != "active"]
|
||||
faulty_services = [s for s in services if service_status(s)["active"] != "active"]
|
||||
if faulty_services:
|
||||
raise YunohostError('app_action_cannot_be_ran_because_required_services_down',
|
||||
services=', '.join(faulty_services))
|
||||
|
|
Loading…
Add table
Reference in a new issue