Merge lp:~mterry/duplicity/s3fsdecode into lp:~duplicity-team/duplicity/0.8-series

Proposed by Michael Terry
Status: Merged
Merged at revision: 1385
Proposed branch: lp:~mterry/duplicity/s3fsdecode
Merge into: lp:~duplicity-team/duplicity/0.8-series
Diff against target: 40 lines (+6/-0)
1 file modified
duplicity/backends/_boto_single.py (+6/-0)
To merge this branch: bzr merge lp:~mterry/duplicity/s3fsdecode
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+369429@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'duplicity/backends/_boto_single.py'
2--- duplicity/backends/_boto_single.py 2019-06-17 15:10:58 +0000
3+++ duplicity/backends/_boto_single.py 2019-06-27 22:53:46 +0000
4@@ -29,6 +29,7 @@
5 from duplicity import log
6 from duplicity.errors import FatalBackendException, BackendException
7 from duplicity import progress
8+from duplicity import util
9
10 BOTO_MIN_VERSION = u"2.1.1"
11
12@@ -201,6 +202,8 @@
13 self.resetConnection()
14
15 def _put(self, source_path, remote_filename):
16+ remote_filename = util.fsdecode(remote_filename)
17+
18 if globals.s3_european_buckets:
19 if not globals.s3_use_new_style:
20 raise FatalBackendException(u"European bucket creation was requested, but not new-style "
21@@ -265,6 +268,7 @@
22 rough_upload_speed))
23
24 def _get(self, remote_filename, local_path):
25+ remote_filename = util.fsdecode(remote_filename)
26 key_name = self.key_prefix + remote_filename
27 self.pre_process_download(remote_filename, wait=True)
28 key = self._listed_keys[key_name]
29@@ -298,9 +302,11 @@
30 return filename_list
31
32 def _delete(self, filename):
33+ filename = util.fsdecode(filename)
34 self.bucket.delete_key(self.key_prefix + filename)
35
36 def _query(self, filename):
37+ filename = util.fsdecode(filename)
38 key = self.bucket.lookup(self.key_prefix + filename)
39 if key is None:
40 return {u'size': -1}

Subscribers

People subscribed via source and target branches