summaryrefslogtreecommitdiffstats
path: root/Modules/_randommodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_randommodule.c')
-rw-r--r--Modules/_randommodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index bd1c9d3..591947e 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -481,7 +481,7 @@ random_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
RandomObject *self;
PyObject *tmp;
- if (!_PyArg_NoKeywords("Random()", kwds))
+ if (type == &Random_Type && !_PyArg_NoKeywords("Random()", kwds))
return NULL;
self = (RandomObject *)type->tp_alloc(type, 0);