112
112
self.subprocess_popen(commandline)
114
114
def _get(self, remote_filename, local_path):
115
remote_path = os.path.join (self.url_string, remote_filename)
115
remote_path = os.path.join(self.url_string, remote_filename)
116
116
commandline = "%s %s %s" % (self.cmd, remote_path, local_path.name)
117
117
self.subprocess_popen(commandline)
122
if len (line) > 4 and line[4] != '.':
122
if len(line) > 4 and line[4] != '.':
126
126
commandline = "%s %s" % (self.cmd, self.url_string)
127
127
result, stdout, stderr = self.subprocess_popen(commandline)
128
return [x for x in map (split, stdout.split('\n')) if x]
128
return [x for x in map(split, stdout.split('\n')) if x]
130
130
def _delete_list(self, filename_list):
131
131
delete_list = filename_list
132
132
dont_delete_list = []
133
for file in self._list ():
133
for file in self._list():
134
134
if file in delete_list:
135
delete_list.remove (file)
135
delete_list.remove(file)
137
dont_delete_list.append (file)
137
dont_delete_list.append(file)
139
139
dir = tempfile.mkdtemp()
140
140
exclude, exclude_name = tempdir.default().mkstemp_file()
141
141
to_delete = [exclude_name]
142
142
for file in dont_delete_list:
143
path = os.path.join (dir, file)
144
to_delete.append (path)
143
path = os.path.join(dir, file)
144
to_delete.append(path)
146
146
print >> exclude, file
151
151
self.subprocess_popen(commandline)
152
152
for file in to_delete:
153
153
util.ignore_missing(os.unlink, file)
156
156
duplicity.backend.register_backend("rsync", RsyncBackend)
157
157
duplicity.backend.uses_netloc.extend([ 'rsync' ])