diff options
author | Georg Brandl <georg@python.org> | 2006-05-29 14:13:21 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-05-29 14:13:21 (GMT) |
commit | a1121fa9350f16bbae18b66b8c3825fd5e4706f6 (patch) | |
tree | aa620532288c4081a5a069ab0cbb0234fa7af246 /Python | |
parent | bda0744d558707acaf33892cf0656c06477d64f5 (diff) | |
download | cpython-a1121fa9350f16bbae18b66b8c3825fd5e4706f6.zip cpython-a1121fa9350f16bbae18b66b8c3825fd5e4706f6.tar.gz cpython-a1121fa9350f16bbae18b66b8c3825fd5e4706f6.tar.bz2 |
Fix #1494605.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/errors.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c index a40f073..56463a3 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -728,7 +728,8 @@ PyErr_SyntaxLocation(const char *filename, int lineno) tmp = PyErr_ProgramText(filename, lineno); if (tmp) { - PyObject_SetAttrString(v, "text", tmp); + if (PyObject_SetAttrString(v, "text", tmp)) + PyErr_Clear(); Py_DECREF(tmp); } } |