Merge lp:~kaffeekiffer/duplicity/azure-filename into lp:~duplicity-team/duplicity/0.8-series

Proposed by Frank Fischer
Status: Merged
Merged at revision: 1450
Proposed branch: lp:~kaffeekiffer/duplicity/azure-filename
Merge into: lp:~duplicity-team/duplicity/0.8-series
Diff against target: 24 lines (+3/-2)
1 file modified
duplicity/backends/azurebackend.py (+3/-2)
To merge this branch: bzr merge lp:~kaffeekiffer/duplicity/azure-filename
Reviewer Review Type Date Requested Status
Kenneth Loafman Pending
Review via email: mp+371574@code.launchpad.net

Commit message

Encode Azure back-end paths

Description of the change

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'

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
=== 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 @@
116 log.ErrorCode.connection_failed)116 log.ErrorCode.connection_failed)
117117
118 def _put(self, source_path, remote_filename):118 def _put(self, source_path, remote_filename):
119 remote_filename = fsdecode(remote_filename)
119 kwargs = {}120 kwargs = {}
120 if globals.azure_max_connections:121 if globals.azure_max_connections:
121 kwargs[u'max_connections'] = globals.azure_max_connections122 kwargs[u'max_connections'] = globals.azure_max_connections
@@ -153,10 +154,10 @@
153154
154 def _delete(self, filename):155 def _delete(self, filename):
155 # http://azure.microsoft.com/en-us/documentation/articles/storage-python-how-to-use-blob-storage/#delete-blobs156 # http://azure.microsoft.com/en-us/documentation/articles/storage-python-how-to-use-blob-storage/#delete-blobs
156 self.blob_service.delete_blob(self.container, filename)157 self.blob_service.delete_blob(self.container, fsdecode(filename))
157158
158 def _query(self, filename):159 def _query(self, filename):
159 prop = self.blob_service.get_blob_properties(self.container, filename)160 prop = self.blob_service.get_blob_properties(self.container, fsdecode(filename))
160 try:161 try:
161 info = {u'size': int(prop.properties.content_length)}162 info = {u'size': int(prop.properties.content_length)}
162 except AttributeError:163 except AttributeError:

Subscribers

People subscribed via source and target branches