summaryrefslogtreecommitdiff
path: root/Objects
diff options
context:
space:
mode:
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 16ba5e56c2..28fb0c14e8 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;