summaryrefslogtreecommitdiffstats
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index bfe28a9..c0b813d 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -510,7 +510,7 @@ EnvironmentError_init(PyEnvironmentErrorObject *self, PyObject *args,
if (BaseException_init((PyBaseExceptionObject *)self, args, kwds) == -1)
return -1;
- if (PyTuple_GET_SIZE(args) <= 1) {
+ if (PyTuple_GET_SIZE(args) <= 1 || PyTuple_GET_SIZE(args) > 3) {
return 0;
}