提交 3e7666ba authored 作者: James Bergstra's avatar James Bergstra

tweak to ModuleCache.check_keys to ease debugging

上级 19aba239
......@@ -955,9 +955,10 @@ class ModuleCache(object):
if found == 0:
msg = 'Key not found in unpickled KeyData file'
if key_data.keys:
# This is only to make debugging in pdb easier, by providing
# the offending key in the local context.
other_key = key_data.keys.__iter__().next()
# This is to make debugging in pdb easier, by providing
# the offending keys in the local context.
key_data_keys = list(key_data.keys)
## import pdb; pdb.set_trace()
elif found > 1:
msg = 'Multiple equal keys found in unpickled KeyData file'
if msg:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论