Permalink
Browse files

Ditch exception catch on root fetch at GraphDatabase.__init__()

As per versae#65, current
behaviour when auth fails is that a 401 StatusException is raised, and
caught by this try/except block and a misleading NotFoundError is raised
in its place - lets just let the StatusException through. Unsure about
what other Exceptions may be raised but cannot reproduce.
  • Loading branch information...
doismellburning committed Jun 1, 2012
1 parent 532e317 commit ff02570ff84dc1caae4a2f83acf51593acc33cc5
Showing with 1 addition and 5 deletions.
  1. +1 −5 neo4jrestclient/client.py
@@ -76,11 +76,7 @@ def __init__(self, url, username=None, password=None, cert_file=None,
self.url = url
else:
self.url = "%s/" % url
- response, content = None, None
- try:
- response, content = Request(**self._auth).get(url)
- except Exception:
- raise NotFoundError(result="Unable get root")
+ response, content = Request(**self._auth).get(url)
if response.status == 200:
response_json = json.loads(content)
self._relationship_index = response_json['relationship_index']

0 comments on commit ff02570

Please sign in to comment.