diff options
| author | Brett Cannon <brett@python.org> | 2012-04-24 22:03:46 -0400 |
|---|---|---|
| committer | Brett Cannon <brett@python.org> | 2012-04-24 22:03:46 -0400 |
| commit | 901bb2ffffe2b1483cdd1a7316df60a4f24cb665 (patch) | |
| tree | 3271ec28e2bf03cfb9026a1e4432e1d1c2f08a58 /Python/import.c | |
| parent | 6ced0ee0dcec52b2ad78de94eb01a001c67c2239 (diff) | |
| download | cpython-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.c | 4 |
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; |
