提交 d90fee87 authored 作者: Frederic Bastien's avatar Frederic Bastien

don't print warning when it is expected.

上级 50aae681
...@@ -381,7 +381,10 @@ class ModuleCache(object): ...@@ -381,7 +381,10 @@ class ModuleCache(object):
# printing a warning, removing evidence that we ever saw this mystery # printing a warning, removing evidence that we ever saw this mystery
# key. # key.
pkl_file_to_remove = os.path.join(os.path.dirname(entry), 'key.pkl') pkl_file_to_remove = os.path.join(os.path.dirname(entry), 'key.pkl')
warning('Removing key file %s because the corresponding module is gone from the file system.' % pkl_file_to_remove) if not root.startswith("/tmp"):
# Under /tmp, file are removed periodically by the os.
# So it is normal that this happen from time to time.
warning('Removing key file %s because the corresponding module is gone from the file system.' % pkl_file_to_remove)
self.loaded_key_pkl.remove(pkl_file_to_remove) self.loaded_key_pkl.remove(pkl_file_to_remove)
finally: finally:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论