diff options
| author | Georg Brandl <georg@python.org> | 2006-05-29 14:13:21 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2006-05-29 14:13:21 +0000 |
| commit | a70d59eed5b2e1f69efa48e211f0cd94faba7f85 (patch) | |
| tree | a1f4d9892d53ea45015baa9b9252d32992897cd8 /Python/errors.c | |
| parent | 088b8c8bfb83e5a84dd0f9783dfe6961ec802935 (diff) | |
| download | cpython-a70d59eed5b2e1f69efa48e211f0cd94faba7f85.tar.gz | |
Fix #1494605.
Diffstat (limited to 'Python/errors.c')
| -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 a40f073788..56463a30a0 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); } } |
