提交 812dc28e authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Added debug helper code

上级 2848ff23
...@@ -948,6 +948,10 @@ class ModuleCache(object): ...@@ -948,6 +948,10 @@ class ModuleCache(object):
msg = '' msg = ''
if found == 0: if found == 0:
msg = 'Key not found in unpickled KeyData file' 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()
elif found > 1: elif found > 1:
msg = 'Multiple equal keys found in unpickled KeyData file' msg = 'Multiple equal keys found in unpickled KeyData file'
if msg: if msg:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论