summaryrefslogtreecommitdiffstats
path: root/Python/exceptions.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-09-18 22:37:17 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-09-18 22:37:17 (GMT)
commit2c96ab2b61dc5b58bd9f9724c89e0d42d172662d (patch)
tree55983d4f85f86e2dfe2d9ce8389e2f64ac574c0c /Python/exceptions.c
parent40363b63f02f43e3c9c7442e33e1cb0bf4c25774 (diff)
downloadcpython-2c96ab2b61dc5b58bd9f9724c89e0d42d172662d.zip
cpython-2c96ab2b61dc5b58bd9f9724c89e0d42d172662d.tar.gz
cpython-2c96ab2b61dc5b58bd9f9724c89e0d42d172662d.tar.bz2
Two more cases of switch(PySequence_Size()) without checking for case -1.
(Same problem as last checkin for SF bug 610610) Need to clear the error and proceed. Backport candidate
Diffstat (limited to 'Python/exceptions.c')
-rw-r--r--Python/exceptions.c7
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);