Do not access non-existing member variable.

pull/15/head
Jussi Pakkanen 12 years ago
parent 4d2b827b71
commit fcdc39e049
  1. 4
      mparser.py

@ -227,11 +227,13 @@ def p_args_none(t):
t[0] = nodes.Arguments(t.lineno(0))
def p_error(t):
lineno = -1
if t is None:
txt = 'NONE'
else:
txt = t.value
raise ParserException('Parser errored out at: %s.' % txt, t.lineno)
lineno = t.lineno
raise ParserException('Parser errored out at: %s.' % txt, lineno)
def test_lexer():
s = """hello = (something) # this = (that)

Loading…
Cancel
Save