~duplicity-team/duplicity/0.7-series

« back to all changes in this revision

Viewing changes to duplicity/backends/rsyncbackend.py

  • Committer: Kenneth Loafman
  • Date: 2014-12-12 14:39:54 UTC
  • Revision ID: kenneth@loafman.com-20141212143954-wyln65yd1ynzsrlx
* Source formatted, using PyDev, all source files to fix some easily fixed
  PEP8 issues. Use ignore space when comparing against previous versions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
            portOption = " -e 'ssh -oBatchMode=yes%s'" % port
88
88
        rsyncOptions = globals.rsync_options
89
89
        if rsyncOptions:
90
 
            rsyncOptions= " " + rsyncOptions
 
90
            rsyncOptions = " " + rsyncOptions
91
91
        # build cmd
92
92
        self.cmd = "rsync%s%s" % (portOption, rsyncOptions)
93
93
 
104
104
        if m:
105
105
            return m.group(2), m.group(1).lstrip(':')
106
106
        raise InvalidBackendURL("Could not determine rsync path: %s"
107
 
                                    "" % self.munge_password( url ) )
 
107
                                    "" % self.munge_password(url))
108
108
 
109
109
    def _put(self, source_path, remote_filename):
110
110
        remote_path = os.path.join(self.url_string, remote_filename)
143
143
            path = os.path.join (dir, file)
144
144
            to_delete.append (path)
145
145
            f = open (path, 'w')
146
 
            print >>exclude, file
 
146
            print >> exclude, file
147
147
            f.close()
148
148
        exclude.close()
149
 
        commandline = ("%s --recursive --delete --exclude-from=%s %s/ %s" %
 
149
        commandline = ("%s --recursive --delete --exclude-from=%s %s/ %s" % 
150
150
                                   (self.cmd, exclude_name, dir, self.url_string))
151
151
        self.subprocess_popen(commandline)
152
152
        for file in to_delete: