From: Éric Araujo Date: Sat, 17 Sep 2011 01:35:57 +0000 (+0200) Subject: Use a local name (it was intended to be used but overlooked). X-Git-Tag: v3.3.0a1~1524^2~5^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0cfb81d13f16dfa71b2f5bf215c36dfef319f4fe;p=thirdparty%2FPython%2Fcpython.git Use a local name (it was intended to be used but overlooked). This was caught in the distutils2 repo by pyflakes. --- diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py index 2dd20cd8e6b6..c561c1382dff 100644 --- a/Lib/pkgutil.py +++ b/Lib/pkgutil.py @@ -307,9 +307,9 @@ class ImpLoader: def get_filename(self, fullname=None): fullname = self._fix_name(fullname) mod_type = self.etc[2] - if self.etc[2]==imp.PKG_DIRECTORY: + if mod_type==imp.PKG_DIRECTORY: return self._get_delegate().get_filename() - elif self.etc[2] in (imp.PY_SOURCE, imp.PY_COMPILED, imp.C_EXTENSION): + elif mod_type in (imp.PY_SOURCE, imp.PY_COMPILED, imp.C_EXTENSION): return self.filename return None