webdav: AttributeError: 'module' object has no attribute 'warn'

Bug #1711905 reported by Schneider
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

duplicity version 0.7.13.1
python 2.7.9
Debian 8.9
Target: webdav via IIS v10 on Windows Server 2016

When using the webdav backend I got the error "AttributeError: 'module' object has no attribute 'warn'".
After some research I found the reason for this.
In backends/webdavbackend.py:260 and :264 a 'warn' method of 'log' gets called. But the correct case would be 'Warn', uppercase.
After changing those both lines to log.Warn(...) everything works as expected.

Please excuse me for not fixing this bug myself and creating a pull request, but unfortunately I have no experience with bazaar.

Logs:
WebDAV create connection on 'example.com'
WebDAV PROPFIND /backup/ request with headers: {'Connection': 'keep-alive', 'Depth': '1'}
WebDAV data length: 95
WebDAV response status 401 with reason 'Unauthorized'.
Backtrace of previous error: Traceback (innermost last):
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py", line 369, in inner_retry
    return fn(self, *args)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py", line 571, in list
    return [tobytes(x) for x in self.backend._list()]
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backends/webdavbackend.py", line 340, in _list
    raise e
 AttributeError: 'module' object has no attribute 'warn'

Attempt 1 failed. AttributeError: 'module' object has no attribute 'warn'

Tags: webdav
Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.14
status: New → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.