duplicity-team team mailing list archive
-
duplicity-team team
-
Mailing list archive
-
Message #05111
[Merge] lp:~kaffeekiffer/duplicity/azure-filename into lp:duplicity
Frank Fischer has proposed merging lp:~kaffeekiffer/duplicity/azure-filename into lp:duplicity.
Commit message:
Encode Azure back-end paths
Requested reviews:
Kenneth Loafman (kenneth-loafman)
Related bugs:
Bug #1840897 in Duplicity: "Azure backend file-names erroneous for Python3"
https://bugs.launchpad.net/duplicity/+bug/1840897
For more details, see:
https://code.launchpad.net/~kaffeekiffer/duplicity/azure-filename/+merge/371574
This fixes lp:1840897 and restores consistent behaviour for Python2 _and_ 3, i.e.
duplicity-full-signatures.<timestamp>.sigtar
instead of
b'duplicity-full-signatures.<timestamp>.sigtar'
--
Your team duplicity-team is subscribed to branch lp:duplicity.
=== modified file 'duplicity/backends/azurebackend.py'
--- duplicity/backends/azurebackend.py 2019-06-17 12:14:28 +0000
+++ duplicity/backends/azurebackend.py 2019-08-21 12:57:30 +0000
@@ -116,6 +116,7 @@
log.ErrorCode.connection_failed)
def _put(self, source_path, remote_filename):
+ remote_filename = fsdecode(remote_filename)
kwargs = {}
if globals.azure_max_connections:
kwargs[u'max_connections'] = globals.azure_max_connections
@@ -153,10 +154,10 @@
def _delete(self, filename):
# http://azure.microsoft.com/en-us/documentation/articles/storage-python-how-to-use-blob-storage/#delete-blobs
- self.blob_service.delete_blob(self.container, filename)
+ self.blob_service.delete_blob(self.container, fsdecode(filename))
def _query(self, filename):
- prop = self.blob_service.get_blob_properties(self.container, filename)
+ prop = self.blob_service.get_blob_properties(self.container, fsdecode(filename))
try:
info = {u'size': int(prop.properties.content_length)}
except AttributeError:
Follow ups