Skip to content

Commit 737ca41

Browse files
committed
Update review comments
1 parent 83abbd5 commit 737ca41

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

lisa/node.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -768,11 +768,7 @@ def _collect_logs_using_non_ssh_executor(self) -> None:
768768

769769
if self.features.is_supported(NonSshExecutor):
770770
non_ssh_executor = self.features[NonSshExecutor]
771-
outputs = non_ssh_executor.execute(commands=commands)
772-
collected_info = "\n\n".join(outputs)
773-
self.log.info(
774-
f"Collected information using NonSshExecutor:\n{collected_info}"
775-
)
771+
non_ssh_executor.execute(commands=commands)
776772
else:
777773
self.log.debug(
778774
f"NonSshExecutor is not supported on {self.name}, "

lisa/sut_orchestrator/azure/features.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3784,20 +3784,15 @@ def execute(self, commands: List[str]) -> str:
37843784
parameters=run_command_input,
37853785
)
37863786
result = wait_operation(operation=operation, failure_identity="run command")
3787-
try:
3788-
# Since wait_operation returns a dict (result.as_dict()), access as dict
3789-
value = result.get("value")
3790-
if value and len(value) > 0 and value[0].get("message"):
3791-
message = value[0]["message"]
3792-
else:
3793-
raise LisaException(
3794-
"RunCommand did not run successfully. "
3795-
f"Got response: '{value}'. Expected response to contain `value[0]['message']`"
3796-
)
3787+
value = result.get("value")
3788+
if value and value[0].get("message"):
3789+
message = value[0]["message"]
3790+
else:
3791+
raise LisaException(
3792+
"RunCommand did not run successfully. "
3793+
f"Got response: '{value}'. Expected response to contain `value[0]['message']`"
3794+
)
37973795

3798-
except Exception:
3799-
self._log.info("RunCommand failed to return expected result.")
3800-
raise
38013796
return message
38023797

38033798
def _add_echo_before_command(self, commands: List[str]) -> List[str]:

0 commit comments

Comments
 (0)