Permalink
Browse files

Compatability fix for older versions of neo4jrestclient

  • Loading branch information...
1 parent 94ec5a7 commit 73eaba301f0f7dc4857f2314cf2699588e5cd7a2 Seth Madison committed Apr 1, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 neo4django/neo4jclient.py
@@ -20,7 +20,13 @@
class EnhancedGraphDatabase(GraphDatabase):
def new_request(self):
- return Request(**self._auth)
+ # Newer versions of neo4jrestclient support auth more robustly
+ # the older versions do not support at all, so we have to check here
+ try:
+ auth = self._auth
+ except AttributeError:
+ auth = {}
+ return Request(**auth)
def gremlin(self, script, tx=False, raw=False, **params):
"""

0 comments on commit 73eaba3

Please sign in to comment.