summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-08-04 00:27:29 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-08-04 00:27:29 (GMT)
commit9bd059ff4eecfb10b56a04e611b4ddfd87cc1dab (patch)
tree3aca5674bb7510a15e8a2caf7578d014f5d47777
parent5dd504df289fba6990ab1ee3a3554cd960850c26 (diff)
downloadcpython-9bd059ff4eecfb10b56a04e611b4ddfd87cc1dab.zip
cpython-9bd059ff4eecfb10b56a04e611b4ddfd87cc1dab.tar.gz
cpython-9bd059ff4eecfb10b56a04e611b4ddfd87cc1dab.tar.bz2
Silence warnings under -3 about using dict.has_key() for modulefinder.
-rw-r--r--Lib/modulefinder.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index 34d15b8..ad6a644 100644
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -258,7 +258,7 @@ class ModuleFinder:
else:
self.msgout(3, "import_module ->", m)
return m
- if self.badmodules.has_key(fqname):
+ if fqname in self.badmodules:
self.msgout(3, "import_module -> None")
return None
if parent and parent.__path__ is None:
@@ -279,7 +279,8 @@ class ModuleFinder:
self.msgout(3, "import_module ->", m)
return m
- def load_module(self, fqname, fp, pathname, (suffix, mode, type)):
+ def load_module(self, fqname, fp, pathname, file_info):
+ suffix, mode, type = file_info
self.msgin(2, "load_module", fqname, fp and "fp", pathname)
if type == imp.PKG_DIRECTORY:
m = self.load_package(fqname, pathname)
@@ -460,7 +461,7 @@ class ModuleFinder:
return m
def add_module(self, fqname):
- if self.modules.has_key(fqname):
+ if fqname in self.modules:
return self.modules[fqname]
self.modules[fqname] = m = Module(fqname)
return m