mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
I hope this helps more servers than just Radicale
This commit is contained in:
parent
5051e8949a
commit
a741b5d639
1 changed files with 6 additions and 2 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
:license: MIT, see LICENSE for more details.
|
:license: MIT, see LICENSE for more details.
|
||||||
'''
|
'''
|
||||||
import datetime
|
import datetime
|
||||||
|
import itertools
|
||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
|
||||||
|
|
@ -82,8 +83,11 @@ class Discover(object):
|
||||||
:returns: a list of the user's collections (as urls)
|
:returns: a list of the user's collections (as urls)
|
||||||
:rtype: list(unicode)
|
:rtype: list(unicode)
|
||||||
"""
|
"""
|
||||||
for principal in list(self._find_principal()) or ['']:
|
# Another one of Radicale's specialties: Discovery is broken (returning
|
||||||
for home in list(self._find_home(principal)) or ['']:
|
# completely wrong URLs at every stage) as of version 0.9.
|
||||||
|
# https://github.com/Kozea/Radicale/issues/196
|
||||||
|
for principal in itertools.chain(self._find_principal(), ['']):
|
||||||
|
for home in itertools.chain(self._find_home(principal), ['']):
|
||||||
for collection in self._find_collections(home):
|
for collection in self._find_collections(home):
|
||||||
yield collection
|
yield collection
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue