diff options
author | Georg Brandl <georg@python.org> | 2006-09-30 09:03:45 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-09-30 09:03:45 (GMT) |
commit | 506cc189a97a468180ee18e4c4cd1b4e81242222 (patch) | |
tree | d89db2831faf617dba4844248d5cd75f6c40241d /Objects/exceptions.c | |
parent | af4337a0173d8ae9117b3c82c814ab2b9e635b35 (diff) | |
download | cpython-506cc189a97a468180ee18e4c4cd1b4e81242222.zip cpython-506cc189a97a468180ee18e4c4cd1b4e81242222.tar.gz cpython-506cc189a97a468180ee18e4c4cd1b4e81242222.tar.bz2 |
Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
(backport from rev. 52061)
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r-- | Objects/exceptions.c | 2 |
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; } |