summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-29 14:13:21 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-29 14:13:21 (GMT)
commita1121fa9350f16bbae18b66b8c3825fd5e4706f6 (patch)
treeaa620532288c4081a5a069ab0cbb0234fa7af246 /Python
parentbda0744d558707acaf33892cf0656c06477d64f5 (diff)
downloadcpython-a1121fa9350f16bbae18b66b8c3825fd5e4706f6.zip
cpython-a1121fa9350f16bbae18b66b8c3825fd5e4706f6.tar.gz
cpython-a1121fa9350f16bbae18b66b8c3825fd5e4706f6.tar.bz2
Fix #1494605.
Diffstat (limited to 'Python')
-rw-r--r--Python/errors.c3
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);
}
}