Skip to content
Snippets Groups Projects
Commit 08a13d46 authored by Chris Hines's avatar Chris Hines
Browse files

Merge branch 'master' of gitlab.erc.monash.edu.au:hpc-team/strudelv2_tes

parents 21772750 a1f06226
No related branches found
No related tags found
No related merge requests found
...@@ -185,7 +185,7 @@ class Ssh: ...@@ -185,7 +185,7 @@ class Ssh:
return return
@staticmethod @staticmethod
def sftpls(sess, host, user, sshport, path="",changepath="."): def sftpls(sess, host, user, sshport, path=".",changepath="."):
""" """
Use sftp to run an ls on the given path. Use sftp to run an ls on the given path.
Return the directory listing (as a list) and the cwd Return the directory listing (as a list) and the cwd
...@@ -200,6 +200,10 @@ class Ssh: ...@@ -200,6 +200,10 @@ class Ssh:
Ssh.validate_username(user) Ssh.validate_username(user)
Ssh.validate_hostname(host) Ssh.validate_hostname(host)
ctrlsocket = Ssh.get_ctrl_master_socket(sess, host, user, sshport) ctrlsocket = Ssh.get_ctrl_master_socket(sess, host, user, sshport)
if (path is None or path == ""):
path="."
if (changepath is None or changepath == ""):
changepath="."
exec_p = subprocess.Popen(['sftp', '-b', '-','-o', 'Stricthostkeychecking=no', exec_p = subprocess.Popen(['sftp', '-b', '-','-o', 'Stricthostkeychecking=no',
'-P', sshport, '-o', 'ControlPath={}'.format(ctrlsocket), '-P', sshport, '-o', 'ControlPath={}'.format(ctrlsocket),
'{}@{}'.format(user, host)], '{}@{}'.format(user, host)],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment