def cleanup(self):
print("Cleaning up")
if os.path.exists(self.temp):
# The check for "tempxxx" is to guard against bugs with path operations
# and command-line arguments which might lead to the accidental deletion
# of an important directory.
if "tempxxx" in self.temp:
def handleRemoveReadonly(func, path, exc):
excvalue = exc[1]
if excvalue.errno == errno.EACCES:
os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) # 0777
func(path)
else:
raise
print("rmtree {0}".format(self.temp));
shutil.rmtree(self.temp, ignore_errors=False, onerror=handleRemoveReadonly)
build_filtered_chunks.py 文件源码
python
阅读 88
收藏 0
点赞 0
评论 0
评论列表
文章目录