Issue #14605: Insert to the front of sys.path_hooks instead of appending.

This commit is contained in:
Brett Cannon 2012-04-24 22:03:46 -04:00
parent 4fe29c9657
commit 8923a4d4c5
3 changed files with 5 additions and 5 deletions

View file

@ -268,8 +268,8 @@ _PyImportZip_Init(void)
"# can't import zipimport.zipimporter\n");
}
else {
/* sys.path_hooks.append(zipimporter) */
err = PyList_Append(path_hooks, zipimporter);
/* sys.path_hooks.insert(0, zipimporter) */
err = PyList_Insert(path_hooks, 0, zipimporter);
Py_DECREF(zipimporter);
if (err < 0) {
goto error;