Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb881a83

Browse files
committed
Merge default-ssh-user into multihost-catchup
2 parents2c079c8 +19e9436 commitb881a83

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎testgres/operations/remote_ops.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def exec_command(self, cmd, wait_exit=False, verbose=False, expect_error=False,
9393
"""
9494
ssh_cmd= []
9595
ifisinstance(cmd,str):
96-
ssh_cmd= ['ssh']+self.ssh_args+ [self.ssh_dest+cmd]
96+
ssh_cmd= ['ssh']+self.ssh_args+ [self.ssh_dest,cmd]
9797
elifisinstance(cmd,list):
9898
ssh_cmd= ['ssh']+self.ssh_args+ [self.ssh_dest]+cmd
9999
process=subprocess.Popen(ssh_cmd,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
@@ -286,10 +286,10 @@ def write(self, filename, data, truncate=False, binary=False, read_and_write=Fal
286286

287287
withtempfile.NamedTemporaryFile(mode=mode,delete=False)astmp_file:
288288
# Because in scp we set up port using -P option
289-
scp_ssh_cmd= ['-P'ifx=='-p'elsexforxinself.ssh_cmd]
289+
scp_args= ['-P'ifx=='-p'elsexforxinself.ssh_args]
290290

291291
ifnottruncate:
292-
scp_cmd= ['scp']+self.ssh_args+ [f"{self.ssh_dest}:{filename}",tmp_file.name]
292+
scp_cmd= ['scp']+scp_args+ [f"{self.ssh_dest}:{filename}",tmp_file.name]
293293
subprocess.run(scp_cmd,check=False)# The file might not exist yet
294294
tmp_file.seek(0,os.SEEK_END)
295295

@@ -305,7 +305,7 @@ def write(self, filename, data, truncate=False, binary=False, read_and_write=Fal
305305
tmp_file.write(data)
306306

307307
tmp_file.flush()
308-
scp_cmd= ['scp']+self.ssh_args+ [tmp_file.name,f"{self.ssh_dest}:{filename}"]
308+
scp_cmd= ['scp']+scp_args+ [tmp_file.name,f"{self.ssh_dest}:{filename}"]
309309
subprocess.run(scp_cmd,check=True)
310310

311311
remote_directory=os.path.dirname(filename)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp