From bf3ffc3e7d8d84c8e35a54fcdfb78b45c553dd8d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 3 Apr 2019 12:22:47 +0200 Subject: [PATCH] [fix] service_status returns different type of data if you one or multiple services --- src/yunohost/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 38df51ea0..97210d60c 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -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))