diff options
Diffstat (limited to 'Python/exceptions.c')
-rw-r--r-- | Python/exceptions.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/exceptions.c b/Python/exceptions.c index 03affdc..e4a6880 100644 --- a/Python/exceptions.c +++ b/Python/exceptions.c @@ -419,6 +419,9 @@ SystemExit__init__(PyObject *self, PyObject *args) case 1: code = PySequence_GetItem(args, 0); break; + case -1: + PyErr_Clear(); + /* Fall through */ default: Py_INCREF(args); code = args; @@ -522,6 +525,10 @@ EnvironmentError__init__(PyObject *self, PyObject *args) goto finally; } break; + + case -1: + PyErr_Clear(); + break; } Py_INCREF(Py_None); |