← Back to team overview

duplicity-team team mailing list archive

[Merge] lp:~mterry/duplicity/boto-list-fix into lp:duplicity

 

Michael Terry has proposed merging lp:~mterry/duplicity/boto-list-fix into lp:duplicity.

Requested reviews:
  duplicity-team (duplicity-team)
Related bugs:
  Bug #1266753 in Duplicity: "Boto backend removes local cache if connection cannot be made"
  https://bugs.launchpad.net/duplicity/+bug/1266753

For more details, see:
https://code.launchpad.net/~mterry/duplicity/boto-list-fix/+merge/201443

If boto backend can't connect to S3, don't pretend that there are no files present.  That will cause us to delete our cache files.  Rather, throw an exception.

Patch by Kurt Huwig.
-- 
https://code.launchpad.net/~mterry/duplicity/boto-list-fix/+merge/201443
Your team duplicity-team is requested to review the proposed merge of lp:~mterry/duplicity/boto-list-fix into lp:duplicity.
=== modified file 'duplicity/backends/_boto_multi.py'
--- duplicity/backends/_boto_multi.py	2013-12-30 16:01:49 +0000
+++ duplicity/backends/_boto_multi.py	2014-01-13 15:57:10 +0000
@@ -296,7 +296,7 @@
 
     def _list(self):
         if not self.bucket:
-            return []
+            raise BackendException("No connection to backend")
 
         for n in range(1, globals.num_retries+1):
             if n > 1:

=== modified file 'duplicity/backends/_boto_single.py'
--- duplicity/backends/_boto_single.py	2013-12-30 16:01:49 +0000
+++ duplicity/backends/_boto_single.py	2014-01-13 15:57:10 +0000
@@ -267,7 +267,7 @@
 
     def _list(self):
         if not self.bucket:
-            return []
+            raise BackendException("No connection to backend")
 
         for n in range(1, globals.num_retries+1):
             if n > 1:


Follow ups