B2ProgressListener instance has no attribute '__exit__'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Duplicity 0.7.17
Python 2.7.15
MacOS 10.14.1 and Ubuntu 18.04.1
Backing up to Backblaze B2 fails with the following:
~$ duplicity test.txt b2://acc:key@bucket
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
No signatures found, switching to full backup.
Attempt 1 failed. AttributeError: B2ProgressListener instance has no attribute '__exit__'
It then retries several times but never succeeds. This happens for me with Python 2.7.15 and duplicity 0.7.17 on both MacOS 10.14.1 (python and duplicity from MacPorts) and on Ubuntu 18.04.1 LTS
I came up with the following patch to work around this problem, not sure if that's the correct solution, i.e. there may be some implications to this that I am not aware of:
--- duplicity/
+++ duplicity/
@@ -32,6 +32,9 @@
class B2ProgressListener:
+ def __enter__(self):
+ pass
+
def set_total_
@@ -41,6 +44,8 @@
def close(self):
pass
+ def __exit__(self, exc_type, exc_val, exc_tb):
+ pass
class B2Backend(
"""
Changed in duplicity: | |
importance: | Undecided → Medium |
milestone: | none → 0.8.00 |
status: | New → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |