duplicity-team team mailing list archive
-
duplicity-team team
-
Mailing list archive
-
Message #05040
[Merge] lp:~mterry/duplicity/s3fsdecode into lp:duplicity
Michael Terry has proposed merging lp:~mterry/duplicity/s3fsdecode into lp:duplicity.
Requested reviews:
duplicity-team (duplicity-team)
Related bugs:
Bug #1834373 in Duplicity: "Backup to S3 not possible due to Python3 decoding error"
https://bugs.launchpad.net/duplicity/+bug/1834373
For more details, see:
https://code.launchpad.net/~mterry/duplicity/s3fsdecode/+merge/369429
--
Your team duplicity-team is requested to review the proposed merge of lp:~mterry/duplicity/s3fsdecode into lp:duplicity.
=== modified file 'duplicity/backends/_boto_single.py'
--- duplicity/backends/_boto_single.py 2019-06-17 15:10:58 +0000
+++ duplicity/backends/_boto_single.py 2019-06-27 22:53:46 +0000
@@ -29,6 +29,7 @@
from duplicity import log
from duplicity.errors import FatalBackendException, BackendException
from duplicity import progress
+from duplicity import util
BOTO_MIN_VERSION = u"2.1.1"
@@ -201,6 +202,8 @@
self.resetConnection()
def _put(self, source_path, remote_filename):
+ remote_filename = util.fsdecode(remote_filename)
+
if globals.s3_european_buckets:
if not globals.s3_use_new_style:
raise FatalBackendException(u"European bucket creation was requested, but not new-style "
@@ -265,6 +268,7 @@
rough_upload_speed))
def _get(self, remote_filename, local_path):
+ remote_filename = util.fsdecode(remote_filename)
key_name = self.key_prefix + remote_filename
self.pre_process_download(remote_filename, wait=True)
key = self._listed_keys[key_name]
@@ -298,9 +302,11 @@
return filename_list
def _delete(self, filename):
+ filename = util.fsdecode(filename)
self.bucket.delete_key(self.key_prefix + filename)
def _query(self, filename):
+ filename = util.fsdecode(filename)
key = self.bucket.lookup(self.key_prefix + filename)
if key is None:
return {u'size': -1}
Follow ups