diff options
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/errors.c b/Python/errors.c index 558404a..36ab3d8 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -593,7 +593,7 @@ PyErr_SetImportError(PyObject *msg, PyObject *name, PyObject *path) if (msg == NULL) return NULL; - args = PyTuple_New(0); + args = PyTuple_New(1); if (args == NULL) return NULL; @@ -604,12 +604,10 @@ PyErr_SetImportError(PyObject *msg, PyObject *name, PyObject *path) } if (name == NULL) { - Py_INCREF(Py_None); name = Py_None; } if (path == NULL) { - Py_INCREF(Py_None); path = Py_None; } |