summaryrefslogtreecommitdiff
path: root/Python/import.c
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-04-24 22:03:46 -0400
committerBrett Cannon <brett@python.org>2012-04-24 22:03:46 -0400
commit901bb2ffffe2b1483cdd1a7316df60a4f24cb665 (patch)
tree3271ec28e2bf03cfb9026a1e4432e1d1c2f08a58 /Python/import.c
parent6ced0ee0dcec52b2ad78de94eb01a001c67c2239 (diff)
downloadcpython-901bb2ffffe2b1483cdd1a7316df60a4f24cb665.tar.gz
Issue #14605: Insert to the front of sys.path_hooks instead of appending.
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c
index ab320e523c..8cf10e658c 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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;