summaryrefslogtreecommitdiffstats
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-09-30 09:03:42 (GMT)
committerGeorg Brandl <georg@python.org>2006-09-30 09:03:42 (GMT)
commit3267d28f9db6f5594167f6262d8882b31542dccf (patch)
tree794617ae49f01a8f577a896e80d165b63a6de141 /Objects/exceptions.c
parent5d59c0983431b0b7d3929dd2851b00e20e1d8c15 (diff)
downloadcpython-3267d28f9db6f5594167f6262d8882b31542dccf.zip
cpython-3267d28f9db6f5594167f6262d8882b31542dccf.tar.gz
cpython-3267d28f9db6f5594167f6262d8882b31542dccf.tar.bz2
Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
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;
}