From 8923a4d4c514a621b7f99ee0f3ebdde319aee0e9 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 24 Apr 2012 22:03:46 -0400 Subject: Issue #14605: Insert to the front of sys.path_hooks instead of appending. --- Python/import.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/import.c') 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; -- cgit v1.2.1