mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
parent
37c2467f59
commit
069f5dfa89
3 changed files with 20 additions and 9 deletions
|
|
@ -48,7 +48,8 @@ Radicale
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Vdirsyncer is tested against the git version and the latest PyPI release of
|
Vdirsyncer is tested against the git version and the latest PyPI release of
|
||||||
Radicale.
|
Radicale. Versions ``<= 0.7`` have substantial deficiencies, and using them is
|
||||||
|
neither supported nor encouraged.
|
||||||
|
|
||||||
- Radicale doesn't `support time ranges in the calendar-query of CalDAV
|
- Radicale doesn't `support time ranges in the calendar-query of CalDAV
|
||||||
<https://github.com/Kozea/Radicale/issues/146>`_, so setting ``start_date``
|
<https://github.com/Kozea/Radicale/issues/146>`_, so setting ``start_date``
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,19 @@ def do_the_radicale_dance(tmpdir):
|
||||||
import radicale.config
|
import radicale.config
|
||||||
|
|
||||||
# Now we can set some basic configuration.
|
# Now we can set some basic configuration.
|
||||||
radicale.config.set('rights', 'type', 'owner_only')
|
# Radicale <=0.7 doesn't work with this, therefore we just catch the
|
||||||
radicale.config.set('auth', 'type', 'http')
|
# exception and assume Radicale is open for everyone.
|
||||||
|
try:
|
||||||
|
radicale.config.set('rights', 'type', 'owner_only')
|
||||||
|
radicale.config.set('auth', 'type', 'http')
|
||||||
|
|
||||||
import radicale.auth.http
|
import radicale.auth.http
|
||||||
|
|
||||||
def is_authenticated(user, password):
|
def is_authenticated(user, password):
|
||||||
return user == 'bob' and password == 'bob'
|
return user == 'bob' and password == 'bob'
|
||||||
radicale.auth.http.is_authenticated = is_authenticated
|
radicale.auth.http.is_authenticated = is_authenticated
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
if storage_backend == 'filesystem':
|
if storage_backend == 'filesystem':
|
||||||
radicale.config.set('storage', 'type', 'filesystem')
|
radicale.config.set('storage', 'type', 'filesystem')
|
||||||
|
|
|
||||||
|
|
@ -419,9 +419,14 @@ class DavStorage(Storage):
|
||||||
|
|
||||||
contenttype = prop.find('{DAV:}getcontenttype').text
|
contenttype = prop.find('{DAV:}getcontenttype').text
|
||||||
|
|
||||||
etag = prop.find('{DAV:}getetag').text
|
|
||||||
href = self._normalize_href(element.find('{DAV:}href').text)
|
href = self._normalize_href(element.find('{DAV:}href').text)
|
||||||
if self.item_mimetype not in contenttype:
|
etag = prop.find('{DAV:}getetag').text
|
||||||
|
if not etag:
|
||||||
|
raise ValueError('Server did not return an etag for item {}. '
|
||||||
|
'Vdirsyncer is unable to function without '
|
||||||
|
'one.'.format(href))
|
||||||
|
|
||||||
|
if not contenttype or self.item_mimetype not in contenttype:
|
||||||
dav_logger.debug(
|
dav_logger.debug(
|
||||||
'Skipping item with href {!r} '
|
'Skipping item with href {!r} '
|
||||||
'because content type {!r} != {!r}.'
|
'because content type {!r} != {!r}.'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue