mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
This commit is contained in:
parent
5d59c09834
commit
3267d28f9d
3 changed files with 12 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue