From 380184cf8a014e4e85de7ae19d2286dcaaa570bc Mon Sep 17 00:00:00 2001 From: Kenn Knowles Date: Fri, 14 Jun 2013 17:59:46 -0400 Subject: Fix error reporting for unknown named operators --- jsonpath_rw/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonpath_rw/parser.py b/jsonpath_rw/parser.py index 21bd5d3..d8bd6a6 100644 --- a/jsonpath_rw/parser.py +++ b/jsonpath_rw/parser.py @@ -96,7 +96,7 @@ class JsonPathParser(object): if p[1] == 'this': p[0] = This() else: - raise Exception('Unknown named operator `%s` at %s:%s' % (t.value, t.lineno, t.col)) + raise Exception('Unknown named operator `%s` at %s:%s' % (p[1], p.lineno(1), p.lexpos(1))) def p_jsonpath_root(self, p): "jsonpath : '$'" -- cgit v1.2.1