diff options
author | Guido van Rossum <guido@python.org> | 2008-02-21 18:18:37 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2008-02-21 18:18:37 (GMT) |
commit | 8bc0965adfbe55926a475370c70a8366462daccc (patch) | |
tree | 243302c6d0cae2fd0328aab4841409d148a10e80 /Lib/distutils/core.py | |
parent | b5e2684a1a7091239109b9f91be6c36fc75fdccb (diff) | |
download | cpython-8bc0965adfbe55926a475370c70a8366462daccc.zip cpython-8bc0965adfbe55926a475370c70a8366462daccc.tar.gz cpython-8bc0965adfbe55926a475370c70a8366462daccc.tar.bz2 |
Removed uses of dict.has_key() from distutils, and uses of
callable() from copy_reg.py, so the interpreter now starts up
without warnings when '-3' is given. More work like this needs to
be done in the rest of the stdlib.
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r-- | Lib/distutils/core.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index c9c6f03..c40dd0a 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -101,9 +101,9 @@ def setup (**attrs): else: klass = Distribution - if not attrs.has_key('script_name'): + if 'script_name' not in attrs: attrs['script_name'] = os.path.basename(sys.argv[0]) - if not attrs.has_key('script_args'): + if 'script_args' not in attrs: attrs['script_args'] = sys.argv[1:] # Create the Distribution instance, using the remaining arguments @@ -111,7 +111,7 @@ def setup (**attrs): try: _setup_distribution = dist = klass(attrs) except DistutilsSetupError, msg: - if attrs.has_key('name'): + if 'name' in attrs: raise SystemExit, "error in %s setup command: %s" % \ (attrs['name'], msg) else: |