Ejemplo n.º 1
0
 def transfer(self, filename):
     # need to single-quote the *path* for the purposes of the remote shell so it doesn't fail, because the path is used in the remote shell
     path = os.path.join(self.incoming_dir, filename)
     path = util.shell_quote(path)
     path = "%s:%s" % (self.ssh_hostname, path)
     opts = ["-arvzP"]
     cmdline = [ "rsync" ] + opts + [ path , self.local_download_dir ]
     returncode = util.passthru(cmdline)
     return returncode
Ejemplo n.º 2
0
 def transfer(self, filename):
     # in this implementation, get_finished_torrents MUST BE called first
     # or else this will bomb out with an attribute error
     # need to single-quote the *path* for the purposes of the remote shell so it doesn't fail, because the path is used in the remote shell
     path = util.shell_quote(self.path_for_filename_cache[filename])
     path = "%s:%s" % (self.ssh_hostname, path)
     opts = ["-arvzP"]
     cmdline = [ "rsync" ] + opts + [ path , self.local_download_dir ]
     returncode = util.passthru(cmdline)
     return returncode