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

pep8

上级 ee4f2a97
...@@ -1440,8 +1440,8 @@ class ModuleCache(object): ...@@ -1440,8 +1440,8 @@ class ModuleCache(object):
for filename in os.listdir(self.dirname): for filename in os.listdir(self.dirname):
if filename.startswith('tmp'): if filename.startswith('tmp'):
try: try:
open(os.path.join(self.dirname, filename, 'key.pkl') fname = os.path.join(self.dirname, filename, 'key.pkl')
).close() open(fname).close()
has_key = True has_key = True
except IOError: except IOError:
has_key = False has_key = False
...@@ -1476,8 +1476,8 @@ class ModuleCache(object): ...@@ -1476,8 +1476,8 @@ class ModuleCache(object):
with compilelock.lock_ctx(): with compilelock.lock_ctx():
for f in to_del: for f in to_del:
_rmtree(f, _rmtree(f,
msg='old unversioned', level=logging.INFO, msg='old unversioned', level=logging.INFO,
ignore_nocleanup=True) ignore_nocleanup=True)
def _on_atexit(self): def _on_atexit(self):
# Note: no need to call refresh() since it is called by clear_old(). # Note: no need to call refresh() since it is called by clear_old().
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论