Multi backend should convert URLs to bytes strings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Because multi backend reads it's configuration from JSON, the `url` variables are of type `unicode`.
This breaks backends such as WebDAV, WebDAV internally uses pythons `httplib` witch expects URLs as `str` not `unicode`.
Steps to Reporduce:
1) Verify that direct backup to WebDAV(s) works
2) Put WebDAV(s) config into JSON for multi backend
3) Try to execute backup
Actual result:
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib/
return fn(self, *args)
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
raise e
UnicodeDec
Expected result:
Successful backup procedure
Suggested fix:
In multi backend do convert url variable fom JSON to byte string `url.encode(
Environment:
Duplicty: 0.7.03
Python 2.7.9
Ubuntu 15.04 x64
summary: |
- Multi backend should convert URLs to bytes tsrings + Multi backend should convert URLs to bytes srings |
summary: |
- Multi backend should convert URLs to bytes srings + Multi backend should convert URLs to bytes strings |
Also experiencing this - adding the line url = url.encode("utf-8") after url = config['url'] fixes the issue.
This fix will also be in my proposed patch to allow 'multi' backend to mirror backup data vs just stripe.