mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Issue #14605: Insert to the front of sys.path_hooks instead of appending.
This commit is contained in:
parent
4fe29c9657
commit
8923a4d4c5
3 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue