Commit 19562975d9d716fa679f4de4eb16c20a74b638f8

Authored by Alexis Koralewski
1 parent 1fcfd17c
Exists in dev

Fix get_agent_real_name

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
src/core/pyros_django/obs_config/obsconfig_class.py
... ... @@ -1379,8 +1379,10 @@ class OBSConfig:
1379 1379 computer_agents = self.get_agents_per_computer(self.unit_name)[computer_hostname]
1380 1380 print(f"{computer_agents=}")
1381 1381 for computer_agent_name in computer_agents:
1382   - if agent_name in computer_agent_name:
1383   - return computer_agent_name
  1382 + protocol_name = self.get_agent_information(computer_agent_name).get("protocol")
  1383 + agent_real_name, _ = os.path.splitext(protocol_name):
  1384 + if agent_name in agent_real_name:
  1385 + return agent_name
1384 1386 return agent_name
1385 1387  
1386 1388 def get_channel_of_agent(self, agent_name:str)->dict:
... ...