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
1=== modified file 'duplicity/backends/azurebackend.py'
2--- duplicity/backends/azurebackend.py 2019-06-17 12:14:28 +0000
3+++ duplicity/backends/azurebackend.py 2019-08-21 12:57:30 +0000
4@@ -116,6 +116,7 @@
5 log.ErrorCode.connection_failed)
6
7 def _put(self, source_path, remote_filename):
8+ remote_filename = fsdecode(remote_filename)
9 kwargs = {}
10 if globals.azure_max_connections:
11 kwargs[u'max_connections'] = globals.azure_max_connections
12@@ -153,10 +154,10 @@
13
14 def _delete(self, filename):
15 # http://azure.microsoft.com/en-us/documentation/articles/storage-python-how-to-use-blob-storage/#delete-blobs
16- self.blob_service.delete_blob(self.container, filename)
17+ self.blob_service.delete_blob(self.container, fsdecode(filename))
18
19 def _query(self, filename):
20- prop = self.blob_service.get_blob_properties(self.container, filename)
21+ prop = self.blob_service.get_blob_properties(self.container, fsdecode(filename))
22 try:
23 info = {u'size': int(prop.properties.content_length)}
24 except AttributeError:

Subscribers

People subscribed via source and target branches