Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 894ec2f54ad6fa77d5dbb0ea789f7330 > files > 2

duplicity-0.6.14-1.fc14.src.rpm

Patch by Robert Scheck <robert@fedoraproject.org> which makes duplicity >= 0.6.14 working by using
the older Python 2.3, that doesn't support the non-decorator syntax, which is used at @retry. It's
also changing the if/else syntax back to the classical one.

--- duplicity-0.6.14/src/backends/u1backend.py			2011-06-18 15:53:21.000000000 +0200
+++ duplicity-0.6.14/src/backends/u1backend.py.python23		2011-07-17 20:48:50.000000000 +0200
@@ -116,8 +116,10 @@
         else:
             code = log.ErrorCode.backend_error
 
-        file1 = file1.encode("utf8") if file1 else None
-        file2 = file2.encode("utf8") if file2 else None
+        if file1:
+            file1 = file1.encode("utf8")
+        if file2:
+            file2 = file2.encode("utf8")
         extra = ' '.join([util.escape(x) for x in [file1, file2] if x])
         extra = ' '.join([op, extra])
         msg = _("Got status code %s") % status
--- duplicity-0.6.14/src/backends/giobackend.py			2011-06-18 15:53:21.000000000 +0200
+++ duplicity-0.6.14/src/backends/giobackend.py.python23	2011-07-17 21:11:08.000000000 +0200
@@ -108,7 +108,6 @@
     def copy_progress(self, *args, **kwargs):
         pass
 
-    @retry
     def copy_file(self, op, source, target, raise_errors=False):
         log.Info(_("Writing %s") % target.get_parse_name())
         try:
@@ -117,6 +116,7 @@
         except Exception, e:
             self.handle_error(raise_errors, e, op, source.get_parse_name(),
                               target.get_parse_name())
+    copy_file = retry(copy_file)
 
     def put(self, source_path, remote_filename = None):
         """Copy file to remote"""
@@ -133,7 +133,6 @@
         self.copy_file('get', source_file, target_file)
         local_path.setdata()
 
-    @retry
     def list(self, raise_errors=False):
         """List files in that directory"""
         files = []
@@ -148,8 +147,8 @@
             self.handle_error(raise_errors, e, 'list',
                               self.remote_file.get_parse_name())
         return files
+    list = retry(list)
 
-    @retry
     def delete(self, filename_list, raise_errors=False):
         """Delete all files in filename list"""
         assert type(filename_list) is not types.StringType
@@ -164,3 +163,4 @@
                 self.handle_error(raise_errors, e, 'delete',
                                   target_file.get_parse_name())
                 return
+    delete = retry(delete)