From 1a2f26dc34600e97c65eb0359d79b91c85a07eab Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 24 Jul 2020 00:52:46 +0200 Subject: [PATCH] [fix] Let's not redefine the value for the 'service' var ... --- src/yunohost/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yunohost/service.py b/src/yunohost/service.py index 278cea0a4..f12c0743c 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -97,8 +97,8 @@ def service_add(name, description=None, log=None, log_type=None, test_status=Non service["test_status"] = test_status else: # Try to get the description from systemd service - _, service = _get_service_information_from_systemd(name) - type_ = service.get("Type") if service is not None else "" + _, systemd_info = _get_service_information_from_systemd(name) + type_ = systemd_info.get("Type") if systemd_info is not None else "" if type_ == "oneshot": logger.warning("/!\\ Packagers! Please provide a --test_status when adding oneshot-type services in Yunohost, such that it has a reliable way to check if the service is running or not.")