mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
bugfix: odd error message if URL not WebDAV
If the queried URL is not speaking WebDAV, there is no 'DAV' response header and a misleading (to the end user) exception is raised. I've wanted to fix this for some time in khal.
This commit is contained in:
parent
55c33d749b
commit
f6af9697a9
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ class CaldavStorage(Storage):
|
|||
headers=headers
|
||||
)
|
||||
response.raise_for_status()
|
||||
if 'calendar-access' not in response.headers['DAV']:
|
||||
if 'DAV' not in response.headers or 'calendar-access' not in response.headers['DAV']:
|
||||
raise exceptions.StorageError('URL is not a CalDAV collection')
|
||||
|
||||
def _default_headers(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue