diff options
author | Robert Scheck <robert@fedoraproject.org> | 2011-07-17 22:28:43 +0200 |
---|---|---|
committer | Robert Scheck <robert@fedoraproject.org> | 2011-07-17 22:28:43 +0200 |
commit | 2346ad06929555a3813b6555ce917ec42dde40e7 (patch) | |
tree | 57a8a148866fa34f5d593db5bcc473969aff83fa /duplicity-0.6.14-python23.patch | |
parent | 4799866be726dd4d512f4ba6bff77984e2a80131 (diff) |
- Upgrade to 0.6.14 (#720589, #697222)
- Backported optparse 1.5a2 from RHEL 5 for RHEL 4 (#717133)
Diffstat (limited to 'duplicity-0.6.14-python23.patch')
-rw-r--r-- | duplicity-0.6.14-python23.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/duplicity-0.6.14-python23.patch b/duplicity-0.6.14-python23.patch new file mode 100644 index 0000000..27f5747 --- /dev/null +++ b/duplicity-0.6.14-python23.patch @@ -0,0 +1,60 @@ +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) |