mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-12 11:55:53 +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
|
||||
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
|
||||
<https://github.com/Kozea/Radicale/issues/146>`_, so setting ``start_date``
|
||||
|
|
|
|||
|
|
@ -59,14 +59,19 @@ def do_the_radicale_dance(tmpdir):
|
|||
import radicale.config
|
||||
|
||||
# Now we can set some basic configuration.
|
||||
radicale.config.set('rights', 'type', 'owner_only')
|
||||
radicale.config.set('auth', 'type', 'http')
|
||||
# Radicale <=0.7 doesn't work with this, therefore we just catch the
|
||||
# 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):
|
||||
return user == 'bob' and password == 'bob'
|
||||
radicale.auth.http.is_authenticated = is_authenticated
|
||||
def is_authenticated(user, password):
|
||||
return user == 'bob' and password == 'bob'
|
||||
radicale.auth.http.is_authenticated = is_authenticated
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
if storage_backend == 'filesystem':
|
||||
radicale.config.set('storage', 'type', 'filesystem')
|
||||
|
|
|
|||
|
|
@ -419,9 +419,14 @@ class DavStorage(Storage):
|
|||
|
||||
contenttype = prop.find('{DAV:}getcontenttype').text
|
||||
|
||||
etag = prop.find('{DAV:}getetag').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(
|
||||
'Skipping item with href {!r} '
|
||||
'because content type {!r} != {!r}.'
|
||||
|
|
|
|||
Loading…
Reference in a new issue