From 3a3b763bb498c0deda8f367b70414a89d7b80e55 Mon Sep 17 00:00:00 2001 From: Haijiao Zhao Date: Wed, 13 Mar 2024 01:11:44 -0400 Subject: [PATCH] Fixup:Missing args of ShellError To fix TypeError: __init__() missing 2 required positional arguments: 'cmd' and 'output' Signed-off-by: Haijiao Zhao --- virttest/utils_net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virttest/utils_net.py b/virttest/utils_net.py index ec54afde44..555c873f64 100644 --- a/virttest/utils_net.py +++ b/virttest/utils_net.py @@ -4064,7 +4064,7 @@ def get_default_gateway( _, output = utils_misc.cmd_status_output(cmd, shell=True, session=session) matches = [x for x in output.split("\n") if re.match(regex, x)] if not matches: - raise aexpect.ShellError + raise aexpect.ShellError(cmd, output) if ip_ver == "ipv6" and any("fe80:" not in m for m in matches): LOG.error("Multipath ipv6 router can not be recognized!") return None