diff options
Diffstat (limited to 'duplicity-0.6.14-python23.patch')
-rw-r--r-- | duplicity-0.6.14-python23.patch | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/duplicity-0.6.14-python23.patch b/duplicity-0.6.14-python23.patch index 27f5747..c86135a 100644 --- a/duplicity-0.6.14-python23.patch +++ b/duplicity-0.6.14-python23.patch @@ -1,28 +1,26 @@ 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/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 +--- 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()) @@ -32,13 +30,13 @@ also changing the if/else syntax back to the classical one. 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""" @@ -48,7 +46,7 @@ also changing the if/else syntax back to the classical one. 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""" @@ -58,3 +56,4 @@ also changing the if/else syntax back to the classical one. target_file.get_parse_name()) return + delete = retry(delete) + |