From 472e92507763188d4f57ee3eba334dfd37e7172d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 17 Oct 2022 23:24:34 +0200 Subject: [PATCH] Fix trigger for yunohost-api restart after self-upgrade --- src/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools.py b/src/tools.py index d4ce2938c..8ff89a1dd 100644 --- a/src/tools.py +++ b/src/tools.py @@ -521,7 +521,7 @@ def tools_upgrade(operation_logger, target=None): returncode = call_async_output(dist_upgrade, callbacks, shell=True) # If yunohost is being upgraded from the webadmin - if "yunohost" in upgradables and Moulinette.interface.type == "api": + if any(p["name"] == "yunohost" for p in upgradables) and Moulinette.interface.type == "api": # Restart the API after 10 sec (at now doesn't support sub-minute times...) # We do this so that the API / webadmin still gets the proper HTTP response