提交 7a0f6775 authored 作者: Frederic's avatar Frederic

small var rename to make code more clear

上级 ccdb98ed
...@@ -667,16 +667,16 @@ class ModuleCache(object): ...@@ -667,16 +667,16 @@ class ModuleCache(object):
# behavior. # behavior.
subdirs = sorted(os.listdir(self.dirname)) subdirs = sorted(os.listdir(self.dirname))
files, root = None, None # To make sure the "del" below works files, root = None, None # To make sure the "del" below works
for root in subdirs: for subdirs_elem in subdirs:
root = os.path.join(self.dirname, root) # Never clean/remove lock_dir
if subdirs_elem == 'lock_dir':
continue
root = os.path.join(self.dirname, subdirs_elem)
key_pkl = os.path.join(root, 'key.pkl') key_pkl = os.path.join(root, 'key.pkl')
if key_pkl in self.loaded_key_pkl: if key_pkl in self.loaded_key_pkl:
continue continue
if not os.path.isdir(root): if not os.path.isdir(root):
continue continue
# Never clean/remove lock_dir
if 'lock_dir' in root:
continue
files = os.listdir(root) files = os.listdir(root)
if not files or 'delete.me' in files: if not files or 'delete.me' in files:
rmtree(root, ignore_nocleanup=True, rmtree(root, ignore_nocleanup=True,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论