diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-07-25 16:47:19 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-07-25 16:47:19 +0300 |
| commit | fcdc39e0492f00f260414a89bd5fa318d078b213 (patch) | |
| tree | c154a349f22681db5a3d02bf8cd231d0730c33c1 /mparser.py | |
| parent | 4d2b827b71081949387876394509395598c4d2dd (diff) | |
| download | meson-fcdc39e0492f00f260414a89bd5fa318d078b213.tar.gz | |
Do not access non-existing member variable.
Diffstat (limited to 'mparser.py')
| -rw-r--r-- | mparser.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mparser.py b/mparser.py index 9bc0f2d63..0b5ed30b9 100644 --- a/mparser.py +++ b/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) |
