Skip to content

Commit

Permalink
Modify static check
Browse files Browse the repository at this point in the history
Signed-off-by: zuohanxu <[email protected]>
  • Loading branch information
zuohanxu committed Jul 20, 2023
1 parent 6e41f0b commit b7900cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions avocado/utils/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ def cmd(self, command, ignore_status=True, timeout=None):
:returns: The command result object.
:rtype: A :class:`avocado.utils.process.CmdResult` instance.
"""
if timeout:
command_argument = f"timeout --foreground {timeout} {command}"
else:
command_argument = command
try:
if timeout:
command_argument = f"timeout --foreground {timeout} {command}"
else:
command_argument = command
return process.run(
self.get_raw_ssh_command(command_argument), ignore_status=ignore_status
)
Expand Down

0 comments on commit b7900cd

Please sign in to comment.