]> granicus.if.org Git - python/commitdiff
Fix it for good :-)
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 18 Apr 2012 14:57:54 +0000 (16:57 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 18 Apr 2012 14:57:54 +0000 (16:57 +0200)
Python/errors.c

index 558404a1ee88eda9960677b5ba0157d38dc45c10..36ab3d87fe4d156e031d36b4633f0c713db32dab 100644 (file)
@@ -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;
     }