Kaydet (Commit) 71f3b854 authored tarafından Mark Dickinson's avatar Mark Dickinson

Make sure that Context traps and flags dictionaries have values 0 and 1

(as documented) rather than True and False.
üst 8aca9d03
......@@ -3613,10 +3613,10 @@ class Context(object):
if _ignored_flags is None:
_ignored_flags = []
if not isinstance(flags, dict):
flags = dict([(s,s in flags) for s in _signals])
flags = dict([(s, int(s in flags)) for s in _signals])
del s
if traps is not None and not isinstance(traps, dict):
traps = dict([(s,s in traps) for s in _signals])
traps = dict([(s, int(s in traps)) for s in _signals])
del s
for name, val in locals().items():
if val is None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment