From ae3280f51f7ed8e6e143a3945ba7c1fecdbcc36d Mon Sep 17 00:00:00 2001 From: Alexis Koralewski Date: Fri, 1 Sep 2023 11:41:06 +0200 Subject: [PATCH] Fix case if agent is an general agent (has no protocol attribute in obsconfig --- src/core/pyros_django/obs_config/obsconfig_class.py | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/src/core/pyros_django/obs_config/obsconfig_class.py b/src/core/pyros_django/obs_config/obsconfig_class.py index 62a305a..c0ccfbb 100644 --- a/src/core/pyros_django/obs_config/obsconfig_class.py +++ b/src/core/pyros_django/obs_config/obsconfig_class.py @@ -1380,6 +1380,9 @@ class OBSConfig: print(f"{computer_agents=}") for computer_agent_name in computer_agents: protocol_name = self.get_agent_information(self.unit_name, computer_agent_name).get("protocol") + if protocol_name is None: + # Agent has no protocol, might be an general agent of PyROS, return the name of the class (i.e. do nothing) + return agent_name agent_real_name, _ = os.path.splitext(protocol_name) if agent_name in agent_real_name: return agent_name -- libgit2 0.21.2