diff options
| author | LV-426 <lv-426@taproot.org.il> | 2014-09-28 23:50:06 +0300 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2014-09-28 23:50:06 +0300 |
| commit | c4dab7675a438781a36fb70e769ed7b911f9ef25 (patch) | |
| tree | 4b5d42fbd0351380cc6f9be0bdf12b37d1366ff5 /src-py | |
| parent | 25e6bbb5e0796cf9a382e252cc47834fa8415014 (diff) | |
type check against 'basestring' rather than str, tagging with: [python2]
Diffstat (limited to 'src-py')
| -rw-r--r-- | src-py/neo4j_util.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src-py/neo4j_util.py b/src-py/neo4j_util.py index 009fbe5f..4c166bfe 100644 --- a/src-py/neo4j_util.py +++ b/src-py/neo4j_util.py @@ -7,7 +7,8 @@ import urllib2 def post_neo4j(url, data): """ - return dict translation of the json string returned by neo4j, raise Exception if the 'errors' key is not empty + @return dict object from the neo4j json POST response + @raise exception: if the 'errors' key is not empty """ ret = post(url, data) ret_data = json.load(ret) @@ -38,7 +39,7 @@ def statement_to_REST_form(query, parameters={}): """ turn cypher query to neo4j json API format """ - assert isinstance(query, str) + assert isinstance(query, basestring) assert isinstance(parameters, dict) return {'statement' : query, 'parameters': parameters} |
