summaryrefslogtreecommitdiffstats
path: root/duplicity-0.6.14-python23.patch
blob: c86135afa3b0c35cd314c45b370b3bf051ec32ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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/collections.py 2011-09-15 14:45:07.000000000 +0200
+++ duplicity-0.6.14/src/collections.py.python23        2011-09-15 14:46:16.000000000 +0200
@@ -373,7 +373,10 @@
             else:
                 type = "inc"
                 time = s.end_time
-            enc = "enc" if s.encrypted else "noenc"
+            if s.encrypted:
+                enc = "enc"
+            else:
+                enc = "noenc"
             l.append("%s%s %s %d %s" % (prefix, type, dup_time.timetostring(time), (len(s)), enc))
         return l

--- 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)