修改文件可能不存在的bug

修改文件可能不存在的bug
main
刘悦 2 years ago committed by GitHub
parent b8ae5a2761
commit 96128d604a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -16,7 +16,11 @@ if(os.path.exists(tmp)):
if(name=="jieba.cache"):continue if(name=="jieba.cache"):continue
path="%s/%s"%(tmp,name) path="%s/%s"%(tmp,name)
delete=os.remove if os.path.isfile(path) else shutil.rmtree delete=os.remove if os.path.isfile(path) else shutil.rmtree
delete(path) try:
delete(path)
except Exception as e:
print(str(e))
pass
import site import site
site_packages_roots = [] site_packages_roots = []
for path in site.getsitepackages(): for path in site.getsitepackages():

Loading…
Cancel
Save