mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Slightly improved error messages
This commit is contained in:
parent
252f634c81
commit
1b31f1449e
1 changed files with 3 additions and 2 deletions
|
|
@ -173,7 +173,7 @@ class Discover(object):
|
|||
# Better don't do string formatting here, because of XML namespaces
|
||||
rv = root.find('.//' + self._homeset_tag + '/{DAV:}href')
|
||||
if rv is None:
|
||||
raise InvalidXMLResponse()
|
||||
raise InvalidXMLResponse('Couldn\'t find home-set.')
|
||||
return utils.compat.urlparse.urljoin(response.url, rv.text)
|
||||
|
||||
def find_collections(self, url=None):
|
||||
|
|
@ -192,7 +192,8 @@ class Discover(object):
|
|||
|
||||
href = response.find('{DAV:}href')
|
||||
if href is None:
|
||||
raise InvalidXMLResponse()
|
||||
raise InvalidXMLResponse('Missing href tag for collection '
|
||||
'props.')
|
||||
href = utils.compat.urlparse.urljoin(r.url, href.text)
|
||||
if href not in done:
|
||||
done.add(href)
|
||||
|
|
|
|||
Loading…
Reference in a new issue