Commit 7e2bddcfba69c20d2ca18b5efd705d63039852da
1 parent
b0340ec8
Exists in
dev
Fix agent realname (iterate over agents name)
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
src/core/pyros_django/obs_config/obsconfig_class.py
@@ -1382,7 +1382,10 @@ class OBSConfig: | @@ -1382,7 +1382,10 @@ class OBSConfig: | ||
1382 | protocol_name = self.get_agent_information(self.unit_name, computer_agent_name).get("protocol") | 1382 | protocol_name = self.get_agent_information(self.unit_name, computer_agent_name).get("protocol") |
1383 | if protocol_name is None: | 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) | 1384 | # Agent has no protocol, might be an general agent of PyROS, return the name of the class (i.e. do nothing) |
1385 | - agent_real_name = agent_name | 1385 | + if agent_name in computer_agent_name: |
1386 | + agent_real_name = agent_name | ||
1387 | + else: | ||
1388 | + continue | ||
1386 | else: | 1389 | else: |
1387 | agent_real_name, _ = os.path.splitext(protocol_name) | 1390 | agent_real_name, _ = os.path.splitext(protocol_name) |
1388 | if agent_real_name == agent_name: | 1391 | if agent_real_name == agent_name: |