From c4dab7675a438781a36fb70e769ed7b911f9ef25 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Sun, 28 Sep 2014 23:50:06 +0300 Subject: type check against 'basestring' rather than str, tagging with: [python2] --- src-py/neo4j_util.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src-py') 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} -- cgit v1.3.1