← Back to team overview

duplicity-team team mailing list archive

[Merge] lp:~germar/duplicity/par2removefix into lp:duplicity

 

Germar has proposed merging lp:~germar/duplicity/par2removefix into lp:duplicity.

Requested reviews:
  duplicity-team (duplicity-team)
Related bugs:
  Bug #1488266 in Duplicity: "par2backend does not remove .par2 files"
  https://bugs.launchpad.net/duplicity/+bug/1488266

For more details, see:
https://code.launchpad.net/~germar/duplicity/par2removefix/+merge/268984

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()
-- 
Your team duplicity-team is requested to review the proposed merge of lp:~germar/duplicity/par2removefix into lp:duplicity.
=== modified file 'duplicity/backends/par2backend.py'
--- duplicity/backends/par2backend.py	2015-06-16 14:02:08 +0000
+++ duplicity/backends/par2backend.py	2015-08-24 22:19:14 +0000
@@ -144,8 +144,8 @@
         """
         self.wrapped_backend._delete(filename)
 
-        remote_list = self.list()
-        filename_list = [filename]
+        remote_list = self.unfiltered_list()
+
         c = re.compile(r'%s(?:\.vol[\d+]*)?\.par2' % filename)
         for remote_filename in remote_list:
             if c.match(remote_filename):
@@ -154,7 +154,7 @@
     def delete_list(self, filename_list):
         """delete given filename_list and all .par2 files that belong to them
         """
-        remote_list = self.list()
+        remote_list = self.unfiltered_list()
 
         for filename in filename_list[:]:
             c = re.compile(r'%s(?:\.vol[\d+]*)?\.par2' % filename)
@@ -179,6 +179,9 @@
                 filtered_list.append(filename)
         return filtered_list
 
+    def unfiltered_list(self):
+        return self.wrapped_backend._list()
+
     def retry_cleanup(self):
         self.wrapped_backend._retry_cleanup()
 


Follow ups