Skip to content

Commit 3e4f68e

Browse files
vyadavmsftCopilot
andauthored
Update lisa/sut_orchestrator/openvmm/node.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9d5c64b commit 3e4f68e

File tree

1 file changed

+13
-10
lines changed
  • lisa/sut_orchestrator/openvmm

1 file changed

+13
-10
lines changed

lisa/sut_orchestrator/openvmm/node.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -801,16 +801,19 @@ def _capture_forwarding_state(
801801
def _capture_command_outputs(self, commands: list[tuple[str, str]]) -> list[str]:
802802
outputs: list[str] = []
803803
for label, command in commands:
804-
result = self.host_node.execute(
805-
command,
806-
shell=True,
807-
sudo=True,
808-
no_info_log=True,
809-
no_error_log=True,
810-
expected_exit_code=0,
811-
)
812-
output = result.stdout.strip()
813-
outputs.append(f"{label}: {output if output else '<empty>'}")
804+
try:
805+
result = self.host_node.execute(
806+
command,
807+
shell=True,
808+
sudo=True,
809+
no_info_log=True,
810+
no_error_log=True,
811+
expected_exit_code=None,
812+
)
813+
output = result.stdout.strip()
814+
outputs.append(f"{label}: {output if output else '<empty>'}")
815+
except LisaException as identifier:
816+
outputs.append(f"{label}: <unavailable: {identifier}>")
814817
return outputs
815818

816819
def stop_node(self, node: Node, wait: bool = True) -> None:

0 commit comments

Comments
 (0)