##// END OF EJS Templates
ensure scp destination directories exist (with mkdir -p)...
MinRK -
Show More
@@ -600,6 +600,11 b' class SSHLauncher(LocalProcessLauncher):'
600 time.sleep(1)
600 time.sleep(1)
601 else:
601 else:
602 break
602 break
603 remote_dir = os.path.dirname(remote)
604 self.log.info("ensuring remote %s:%s/ exists", self.location, remote_dir)
605 check_output(self.ssh_cmd + self.ssh_args + \
606 [self.location, 'mkdir', '-p', '--', remote_dir]
607 )
603 self.log.info("sending %s to %s", local, remote)
608 self.log.info("sending %s to %s", local, remote)
604 check_output(self.scp_cmd + [local, remote])
609 check_output(self.scp_cmd + [local, remote])
605
610
@@ -623,6 +628,9 b' class SSHLauncher(LocalProcessLauncher):'
623 time.sleep(1)
628 time.sleep(1)
624 elif check == u'yes':
629 elif check == u'yes':
625 break
630 break
631 local_dir = os.path.dirname(local)
632 if not os.path.exists(local_dir):
633 os.makedirs(local_dir)
626 check_output(self.scp_cmd + [full_remote, local])
634 check_output(self.scp_cmd + [full_remote, local])
627
635
628 def fetch_files(self):
636 def fetch_files(self):
General Comments 0
You need to be logged in to leave comments. Login now