mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Replace dict.has_key with the 'in' operator
The deprecated has_key method will be removed from dicts in Python 3. For custom dict-like classes, has_key() is kept on Python 2, but disabled for Python 3. Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
committed by
Tomas Babej
parent
8b88caa110
commit
6a741b51da
@@ -401,7 +401,7 @@ class API(ReadOnly):
|
||||
else:
|
||||
level = 'warning'
|
||||
|
||||
if log_mgr.handlers.has_key('console'):
|
||||
if 'console' in log_mgr.handlers:
|
||||
log_mgr.remove_handler('console')
|
||||
log_mgr.create_log_handlers([dict(name='console',
|
||||
stream=sys.stderr,
|
||||
|
||||
Reference in New Issue
Block a user