← Back to team overview

duplicity-team team mailing list archive

[Merge] lp:~kaffeekiffer/duplicity/azure-python3-fix into lp:duplicity

 

Frank Fischer has proposed merging lp:~kaffeekiffer/duplicity/azure-python3-fix into lp:duplicity.

Requested reviews:
  duplicity-team (duplicity-team)

For more details, see:
https://code.launchpad.net/~kaffeekiffer/duplicity/azure-python3-fix/+merge/368905

When using the Azure backend with Python3(!), downloading meta-data will fail with 404

```
Copying duplicity-full-signatures.20190603T070002Z.sigtar to local cache.
Outgoing request: Method=GET, Path=/<container>/b'duplicity-full-signatures.20190603T070002Z.sigtar
https://<storage account>.blob.core.windows.net:443 "GET /<container>/b'duplicity-full-signatures.20190603T070002Z.sigtar'[...] HTTP/1.1" 404 215
```

This fixes this problem.
-- 
Your team duplicity-team is requested to review the proposed merge of lp:~kaffeekiffer/duplicity/azure-python3-fix into lp:duplicity.
=== modified file 'duplicity/backends/azurebackend.py'
--- duplicity/backends/azurebackend.py	2019-03-10 22:58:32 +0000
+++ duplicity/backends/azurebackend.py	2019-06-17 12:31:09 +0000
@@ -26,6 +26,7 @@
 from duplicity import globals
 from duplicity import log
 from duplicity.errors import BackendException
+from duplicity.util import fsdecode
 
 
 class AzureBackend(duplicity.backend.Backend):
@@ -136,7 +137,7 @@
 
     def _get(self, remote_filename, local_path):
         # https://azure.microsoft.com/en-us/documentation/articles/storage-python-how-to-use-blob-storage/#download-blobs
-        self.blob_service.get_blob_to_path(self.container, remote_filename, local_path.name)
+        self.blob_service.get_blob_to_path(self.container, fsdecode(remote_filename), local_path.name)
 
     def _list(self):
         # https://azure.microsoft.com/en-us/documentation/articles/storage-python-how-to-use-blob-storage/#list-the-blobs-in-a-container


Follow ups