Skip to content

Commit 5bdb173

Browse files
committed
Raise ValueError with repr of failing node
1 parent 5b2634e commit 5bdb173

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/simpleeval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def _convert(node):
177177
attr = node.attr
178178
return getattr_safe(obj, attr)
179179

180-
raise ValueError("malformed string")
180+
raise ValueError("malformed node or string: {!r}".format(node))
181181

182182
return _convert(node_or_string)
183183

0 commit comments

Comments
 (0)