mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-02 20:30:26 -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:
1 parent
8b88caa110
commit
6a741b51da
14 files changed
+56
-55
No files matched your search
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user