Skip to content

Commit 6f26fd9

Browse files
committed
ssh: get rid of now-unused target_os parameter
Signed-off-by: Yann Dirson <[email protected]>
1 parent 9df0e3f commit 6f26fd9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/commands.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _ellide_log_lines(log):
6161
return "\n{}".format("\n".join(reduced_message))
6262

6363
def _ssh(hostname_or_ip, cmd, check, simple_output, suppress_fingerprint_warnings,
64-
background, target_os, decode, options):
64+
background, decode, options):
6565
opts = list(options)
6666
opts.append('-o "BatchMode yes"')
6767
if suppress_fingerprint_warnings:
@@ -134,9 +134,9 @@ def _ssh(hostname_or_ip, cmd, check, simple_output, suppress_fingerprint_warning
134134
# This function is kept short for shorter pytest traces upon SSH failures, which are common,
135135
# as pytest prints the whole function definition that raised the SSHCommandFailed exception
136136
def ssh(hostname_or_ip, cmd, check=True, simple_output=True, suppress_fingerprint_warnings=True,
137-
background=False, target_os='linux', decode=True, options=[]):
137+
background=False, decode=True, options=[]):
138138
success, result_or_exc = _ssh(hostname_or_ip, cmd, check, simple_output, suppress_fingerprint_warnings,
139-
background, target_os, decode, options)
139+
background, decode, options)
140140
if not success:
141141
raise result_or_exc
142142
return result_or_exc

lib/vm.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ def try_get_and_store_ip(self):
8484

8585
def ssh(self, cmd, check=True, simple_output=True, background=False, decode=True):
8686
# raises by default for any nonzero return code
87-
target_os = "windows" if self.is_windows else "linux"
8887
return commands.ssh(self.ip, cmd, check=check, simple_output=simple_output, background=background,
89-
target_os=target_os, decode=decode)
88+
decode=decode)
9089

9190
def ssh_with_result(self, cmd):
9291
# doesn't raise if the command's return is nonzero, unless there's a SSH error

0 commit comments

Comments
 (0)