summaryrefslogtreecommitdiffstats
path: root/ipapython/log_manager.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-07-30 17:29:39 +0200
committerTomas Babej <tbabej@redhat.com>2015-08-12 18:17:23 +0200
commit6a741b51dac6efd650f2427604bd54cbf300f761 (patch)
tree2a1ebde55d64a6e2f3c33d1cc8c1ce64f73570f7 /ipapython/log_manager.py
parent8b88caa110e83b42b1e43189c06b6cb3de712353 (diff)
downloadfreeipa-6a741b51dac6efd650f2427604bd54cbf300f761.tar.gz
freeipa-6a741b51dac6efd650f2427604bd54cbf300f761.tar.xz
freeipa-6a741b51dac6efd650f2427604bd54cbf300f761.zip
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>
Diffstat (limited to 'ipapython/log_manager.py')
-rw-r--r--ipapython/log_manager.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipapython/log_manager.py b/ipapython/log_manager.py
index cf3611e0f..7e4545d14 100644
--- a/ipapython/log_manager.py
+++ b/ipapython/log_manager.py
@@ -1148,7 +1148,7 @@ class LogManager(object):
stream = cfg.get("stream")
log_handler = cfg.get("log_handler")
if filename:
- if cfg.has_key("stream"):
+ if "stream" in cfg:
raise ValueError("both filename and stream are specified, must be one or the other, config: %s" % cfg)
path = os.path.abspath(filename)
filemode = cfg.get('filemode', 'a')