Merge lp:~germar/duplicity/par2removefix into lp:~duplicity-team/duplicity/0.7-series

Proposed by Germar
Status: Merged
Merged at revision: 1125
Proposed branch: lp:~germar/duplicity/par2removefix
Merge into: lp:~duplicity-team/duplicity/0.7-series
Diff against target: 32 lines (+6/-3)
1 file modified
duplicity/backends/par2backend.py (+6/-3)
To merge this branch: bzr merge lp:~germar/duplicity/par2removefix
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+268984@code.launchpad.net

Description of the change

After reorganisation in revision 981 and the fix for bug #1406173 the par2backend does not remove .par2 files anymore when removing duplicity-*.gpg files.

This banch will add an unfiltered_list() method which will be used in delete() and delete_list()

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'duplicity/backends/par2backend.py'
2--- duplicity/backends/par2backend.py 2015-06-16 14:02:08 +0000
3+++ duplicity/backends/par2backend.py 2015-08-24 22:19:14 +0000
4@@ -144,8 +144,8 @@
5 """
6 self.wrapped_backend._delete(filename)
7
8- remote_list = self.list()
9- filename_list = [filename]
10+ remote_list = self.unfiltered_list()
11+
12 c = re.compile(r'%s(?:\.vol[\d+]*)?\.par2' % filename)
13 for remote_filename in remote_list:
14 if c.match(remote_filename):
15@@ -154,7 +154,7 @@
16 def delete_list(self, filename_list):
17 """delete given filename_list and all .par2 files that belong to them
18 """
19- remote_list = self.list()
20+ remote_list = self.unfiltered_list()
21
22 for filename in filename_list[:]:
23 c = re.compile(r'%s(?:\.vol[\d+]*)?\.par2' % filename)
24@@ -179,6 +179,9 @@
25 filtered_list.append(filename)
26 return filtered_list
27
28+ def unfiltered_list(self):
29+ return self.wrapped_backend._list()
30+
31 def retry_cleanup(self):
32 self.wrapped_backend._retry_cleanup()
33

Subscribers

People subscribed via source and target branches