bpo-33443 Fix typo in Python/import.c (GH-6722)

This commit is contained in:
ukwksk 2018-05-15 04:10:52 +09:00 committed by Brett Cannon
parent f2290fb19a
commit 5e6312c39e
1 changed files with 5 additions and 5 deletions

View File

@ -92,7 +92,7 @@ _PyImportHooks_Init(void)
_PyInitError _PyInitError
_PyImportZip_Init(void) _PyImportZip_Init(void)
{ {
PyObject *path_hooks, *zimpimport; PyObject *path_hooks, *zipimport;
int err = 0; int err = 0;
path_hooks = PySys_GetObject("path_hooks"); path_hooks = PySys_GetObject("path_hooks");
@ -104,17 +104,17 @@ _PyImportZip_Init(void)
if (Py_VerboseFlag) if (Py_VerboseFlag)
PySys_WriteStderr("# installing zipimport hook\n"); PySys_WriteStderr("# installing zipimport hook\n");
zimpimport = PyImport_ImportModule("zipimport"); zipimport = PyImport_ImportModule("zipimport");
if (zimpimport == NULL) { if (zipimport == NULL) {
PyErr_Clear(); /* No zip import module -- okay */ PyErr_Clear(); /* No zip import module -- okay */
if (Py_VerboseFlag) if (Py_VerboseFlag)
PySys_WriteStderr("# can't import zipimport\n"); PySys_WriteStderr("# can't import zipimport\n");
} }
else { else {
_Py_IDENTIFIER(zipimporter); _Py_IDENTIFIER(zipimporter);
PyObject *zipimporter = _PyObject_GetAttrId(zimpimport, PyObject *zipimporter = _PyObject_GetAttrId(zipimport,
&PyId_zipimporter); &PyId_zipimporter);
Py_DECREF(zimpimport); Py_DECREF(zipimport);
if (zipimporter == NULL) { if (zipimporter == NULL) {
PyErr_Clear(); /* No zipimporter object -- okay */ PyErr_Clear(); /* No zipimporter object -- okay */
if (Py_VerboseFlag) if (Py_VerboseFlag)