From 84e1340362e0596ed4bb364c8b2d9d8c1c6edb27 Mon Sep 17 00:00:00 2001 From: Valery Sinelnikov Date: Thu, 27 Jun 2024 16:42:29 +0400 Subject: [PATCH] Fixed sorting of scripts Reported-by: Sergey Sysoev --- gpoa/storage/dconf_registry.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gpoa/storage/dconf_registry.py b/gpoa/storage/dconf_registry.py index b3467b3..33ef161 100644 --- a/gpoa/storage/dconf_registry.py +++ b/gpoa/storage/dconf_registry.py @@ -371,13 +371,13 @@ class Dconf_registry(): def get_scripts(cls, sid, action): action_scripts = list() for part in cls.scripts: - if action == 'LOGON': + if action == 'LOGON' and part.action == 'LOGON': action_scripts.append(part) - elif action == 'LOGOFF': + elif action == 'LOGOFF' and part.action == 'LOGOFF': action_scripts.append(part) - elif action == 'STARTUP': + elif action == 'STARTUP' and part.action == 'STARTUP': action_scripts.append(part) - elif action == 'SHUTDOWN': + elif action == 'SHUTDOWN' and part.action == 'SHUTDOWN': action_scripts.append(part) return action_scripts