Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0cfb81d

Browse files
committed
Use a local name (it was intended to be used but overlooked).
This was caught in the distutils2 repo by pyflakes.
1 parent 7724a6c commit 0cfb81d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/pkgutil.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ def _get_delegate(self):
307307
def get_filename(self, fullname=None):
308308
fullname = self._fix_name(fullname)
309309
mod_type = self.etc[2]
310-
if self.etc[2]==imp.PKG_DIRECTORY:
310+
if mod_type==imp.PKG_DIRECTORY:
311311
return self._get_delegate().get_filename()
312-
elif self.etc[2] in (imp.PY_SOURCE, imp.PY_COMPILED, imp.C_EXTENSION):
312+
elif mod_type in (imp.PY_SOURCE, imp.PY_COMPILED, imp.C_EXTENSION):
313313
return self.filename
314314
return None
315315

0 commit comments

Comments
 (0)