[Python-checkins] cpython: Use a local name (it was intended to be used but overlooked).

eric.araujo python-checkins at python.org
Mon Sep 19 16:10:50 CEST 2011


http://hg.python.org/cpython/rev/f18e9db83483
changeset:   72402:f18e9db83483
user:        Éric Araujo <merwok at netwok.org>
date:        Sat Sep 17 03:35:57 2011 +0200
summary:
  Use a local name (it was intended to be used but overlooked).

This was caught in the distutils2 repo by pyflakes.

files:
  Lib/pkgutil.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py
--- a/Lib/pkgutil.py
+++ b/Lib/pkgutil.py
@@ -307,9 +307,9 @@
     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
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list