diff options
author | Guido van Rossum <guido@python.org> | 2006-08-19 16:09:41 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-08-19 16:09:41 (GMT) |
commit | 93662417e9253ed87eb94f0b7b51491bfcca3eed (patch) | |
tree | bb9fa38905e38a8097f4e110938e8acbec09c112 /Lib/logging | |
parent | 49061f7b8f8c0e5ca123a545447781e10a3b77d9 (diff) | |
download | cpython-93662417e9253ed87eb94f0b7b51491bfcca3eed.zip cpython-93662417e9253ed87eb94f0b7b51491bfcca3eed.tar.gz cpython-93662417e9253ed87eb94f0b7b51491bfcca3eed.tar.bz2 |
More has_key() fixes.
The optparse fix is a fix to the previous fix, which broke has_option().
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index c65d07f..1ef8f44 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -806,7 +806,7 @@ class PlaceHolder: Add the specified logger as a child of this placeholder. """ #if alogger not in self.loggers: - if not self.loggerMap.has_key(alogger): + if alogger not in self.loggerMap: #self.loggers.append(alogger) self.loggerMap[alogger] = None @@ -863,7 +863,7 @@ class Manager: rv = None _acquireLock() try: - if self.loggerDict.has_key(name): + if name in self.loggerDict: rv = self.loggerDict[name] if isinstance(rv, PlaceHolder): ph = rv @@ -891,7 +891,7 @@ class Manager: rv = None while (i > 0) and not rv: substr = name[:i] - if not self.loggerDict.has_key(substr): + if substr not in self.loggerDict: self.loggerDict[substr] = PlaceHolder(alogger) else: obj = self.loggerDict[substr] |