summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-30 07:34:45 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-30 07:34:45 (GMT)
commit861089fc49e17bc3d192e01f19641d9e01e0fa03 (patch)
treed0290b45b73c8110d7978a99ffc0d258fb14fb31 /Objects
parent008b861bf03f515b19ced29b1138a7c9fc910d82 (diff)
downloadcpython-861089fc49e17bc3d192e01f19641d9e01e0fa03.zip
cpython-861089fc49e17bc3d192e01f19641d9e01e0fa03.tar.gz
cpython-861089fc49e17bc3d192e01f19641d9e01e0fa03.tar.bz2
Disallow keyword args for exceptions.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/exceptions.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 16ba5e5..28fb0c1 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -32,6 +32,9 @@ BaseException_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
PyBaseExceptionObject *self;
+ if (!_PyArg_NoKeywords("BaseException", kwds))
+ return NULL;
+
self = (PyBaseExceptionObject *)type->tp_alloc(type, 0);
/* the dict is created on the fly in PyObject_GenericSetAttr */
self->message = self->dict = NULL;