mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +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
|
# Better don't do string formatting here, because of XML namespaces
|
||||||
rv = root.find('.//' + self._homeset_tag + '/{DAV:}href')
|
rv = root.find('.//' + self._homeset_tag + '/{DAV:}href')
|
||||||
if rv is None:
|
if rv is None:
|
||||||
raise InvalidXMLResponse()
|
raise InvalidXMLResponse('Couldn\'t find home-set.')
|
||||||
return utils.compat.urlparse.urljoin(response.url, rv.text)
|
return utils.compat.urlparse.urljoin(response.url, rv.text)
|
||||||
|
|
||||||
def find_collections(self, url=None):
|
def find_collections(self, url=None):
|
||||||
|
|
@ -192,7 +192,8 @@ class Discover(object):
|
||||||
|
|
||||||
href = response.find('{DAV:}href')
|
href = response.find('{DAV:}href')
|
||||||
if href is None:
|
if href is None:
|
||||||
raise InvalidXMLResponse()
|
raise InvalidXMLResponse('Missing href tag for collection '
|
||||||
|
'props.')
|
||||||
href = utils.compat.urlparse.urljoin(r.url, href.text)
|
href = utils.compat.urlparse.urljoin(r.url, href.text)
|
||||||
if href not in done:
|
if href not in done:
|
||||||
done.add(href)
|
done.add(href)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue