Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 75292:b299c4f31ff2
Close issue #6210: Implement PEP 409
| author | Nick Coghlan <ncoghlan@gmail.com> |
|---|---|
| date | Sun, 26 Feb 2012 17:49:52 +1000 |
| parents | 88aede44ded1 |
| children | ff7587546a1d |
line wrap: on
line diff
--- a/Python/pythonrun.c Sun Feb 26 09:39:55 2012 +0200 +++ b/Python/pythonrun.c Sun Feb 26 17:49:52 2012 +1000 @@ -1698,7 +1698,11 @@ else if (PyExceptionInstance_Check(value)) { cause = PyException_GetCause(value); context = PyException_GetContext(value); - if (cause) { + if (cause && cause == Py_None) { + /* print neither cause nor context */ + ; + } + else if (cause) { res = PySet_Contains(seen, cause); if (res == -1) PyErr_Clear();
