diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-20 16:25:10 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-20 16:25:10 (GMT) |
commit | f1a69c16665c6c031c4723e5bc3e6d6f4118fa5e (patch) | |
tree | cf6ab6722fd4419721519ab7cf5f02d1d981a359 /Lib/distutils | |
parent | 0da7e03e12abd760085bd7e76df617d69fd94822 (diff) | |
download | cpython-f1a69c16665c6c031c4723e5bc3e6d6f4118fa5e.zip cpython-f1a69c16665c6c031c4723e5bc3e6d6f4118fa5e.tar.gz cpython-f1a69c16665c6c031c4723e5bc3e6d6f4118fa5e.tar.bz2 |
Get rid of a bunch more has_key() uses. We *really* need a tool for this.
test_aepack now passes. IDLE still needs to be converted (among others).
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/dir_util.py | 2 | ||||
-rw-r--r-- | Lib/distutils/msvccompiler.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py index a4aff58..92f4934 100644 --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -207,7 +207,7 @@ def remove_tree (directory, verbose=0, dry_run=0): cmd[0](cmd[1]) # remove dir from cache if it's already there abspath = os.path.abspath(cmd[1]) - if _path_created.has_key(abspath): + if abspath in _path_created: del _path_created[abspath] except (IOError, OSError), exc: log.warn(grok_environment_error( diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 0d72837..9ec3508 100644 --- a/Lib/distutils/msvccompiler.py +++ b/Lib/distutils/msvccompiler.py @@ -239,7 +239,7 @@ class MSVCCompiler (CCompiler) : def initialize(self): self.__paths = [] - if os.environ.has_key("DISTUTILS_USE_SDK") and os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): + if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"): # Assume that the SDK set up everything alright; don't try to be # smarter self.cc = "cl.exe" |