Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
wayyoungboy committed Aug 1, 2024
1 parent e2c2250 commit 15cca2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/ssh_client/remote_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def exec_cmd(self, cmd):
self.stdio.verbose("use remote_client_sudo")
stdin, stdout, stderr = self._ssh_fd.exec_command("sudo -n true")
if stderr:
raise Exception(stderr.read().decode('utf-8'))
if len(stderr.read().decode('utf-8').strip())> 0:
raise Exception(stderr.read().decode('utf-8'))
cmd = "sudo {0}".format(cmd)
stdin, stdout, stderr = self._ssh_fd.exec_command(cmd)
err_text = stderr.read()
Expand Down

0 comments on commit 15cca2c

Please sign in to comment.