summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2022-03-18 12:21:02 -0400
committerGitHub <noreply@github.com>2022-03-18 12:21:02 -0400
commit3e771d60be8b82c6cea644bfef9a30b971168183 (patch)
treeacad6646d871b6cc3153f6d027c918dd35a7930c
parentf76ce0e0e08c8eef7a1ed12588a5908bbd65ab03 (diff)
parent77e578c90e32151603850c83082fb4e7b2875f60 (diff)
Merge pull request #10817 from kuldeepkash/micronet_fixes
tests: Fix topotests crash when KeyError found
-rw-r--r--tests/topotests/lib/micronet_cli.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/topotests/lib/micronet_cli.py b/tests/topotests/lib/micronet_cli.py
index 4292f47ce0..ef804f6dc2 100644
--- a/tests/topotests/lib/micronet_cli.py
+++ b/tests/topotests/lib/micronet_cli.py
@@ -110,7 +110,7 @@ def doline(unet, line, writef):
args = oargs.split()
if not args or (len(args) == 1 and args[0] == "*"):
args = sorted(unet.hosts.keys())
- hosts = [unet.hosts[x] for x in args]
+ hosts = [unet.hosts[x] for x in args if x in unet.hosts]
for host in hosts:
if cmd == "t" or cmd == "term":
host.run_in_window("bash", title="sh-%s" % host)
@@ -250,6 +250,8 @@ def cli(
prompt=None,
background=True,
):
+ logger = logging.getLogger("cli-client")
+
if prompt is None:
prompt = "unet> "