Commit ae3280f51f7ed8e6e143a3945ba7c1fecdbcc36d

Authored by Alexis Koralewski
1 parent ac8a42fa
Exists in dev

Fix case if agent is an general agent (has no protocol attribute in obsconfig

Showing 1 changed file with 3 additions and 0 deletions   Show diff stats
src/core/pyros_django/obs_config/obsconfig_class.py
... ... @@ -1380,6 +1380,9 @@ class OBSConfig:
1380 1380 print(f"{computer_agents=}")
1381 1381 for computer_agent_name in computer_agents:
1382 1382 protocol_name = self.get_agent_information(self.unit_name, computer_agent_name).get("protocol")
  1383 + if protocol_name is None:
  1384 + # Agent has no protocol, might be an general agent of PyROS, return the name of the class (i.e. do nothing)
  1385 + return agent_name
1383 1386 agent_real_name, _ = os.path.splitext(protocol_name)
1384 1387 if agent_name in agent_real_name:
1385 1388 return agent_name
... ...