diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-09-30 10:25:39 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-09-30 10:25:39 +0000 |
| commit | 13822c9a2d220d4a76e5d39b585a3c57024bb665 (patch) | |
| tree | 6047f167698d027561008d1c71c72e74925f5a14 /src/runtime/python | |
| parent | 7c0936b7ce23098c052253f7aa3db0c6f3d33054 (diff) | |
better handling for nonExist in the C runtime. BIND is also supported in the linearizer but not in the parser yet
Diffstat (limited to 'src/runtime/python')
| -rw-r--r-- | src/runtime/python/pypgf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/runtime/python/pypgf.c b/src/runtime/python/pypgf.c index b5ff53af0..a76344ca7 100644 --- a/src/runtime/python/pypgf.c +++ b/src/runtime/python/pypgf.c @@ -1378,8 +1378,12 @@ Concr_linearize(ConcrObject* self, PyObject *args) pgf_linearize(self->concr, pyexpr->expr, out, err); if (!gu_ok(err)) { - PyErr_SetString(PGFError, "The abstract tree cannot be linearized"); - return NULL; + if (gu_exn_caught(err) == gu_type(PgfLinNonExist)) + Py_RETURN_NONE; + else { + PyErr_SetString(PGFError, "The abstract tree cannot be linearized"); + return NULL; + } } GuString str = gu_string_buf_freeze(sbuf, tmp_pool); |
