功能修复:修复依赖时异常卡死
This commit is contained in:
parent
478bcd5f43
commit
5cdf9d752f
1 changed files with 16 additions and 10 deletions
|
@ -125,18 +125,24 @@ class Api:
|
|||
os._exit(0)
|
||||
|
||||
def rm_site_packages(self):
|
||||
site_packages_path = Path("./python/Lib/site-packages")
|
||||
if site_packages_path.exists():
|
||||
rmtree(site_packages_path)
|
||||
return "site-packages目录移除成功"
|
||||
return "python\\Lib\\site-packages目录不存在"
|
||||
try:
|
||||
site_packages_path = Path("./python/Lib/site-packages")
|
||||
if site_packages_path.exists():
|
||||
rmtree(site_packages_path)
|
||||
return "site-packages目录移除成功"
|
||||
return "python\\Lib\\site-packages目录不存在"
|
||||
except Exception as e:
|
||||
return repr(e)
|
||||
|
||||
def rm_python_scripts(self):
|
||||
python_scripts_path = Path("./python/Scripts")
|
||||
if python_scripts_path.exists():
|
||||
rmtree(python_scripts_path)
|
||||
return "Scripts目录移除成功"
|
||||
return "python\\Scripts目录不存在"
|
||||
try:
|
||||
python_scripts_path = Path("./python/Scripts")
|
||||
if python_scripts_path.exists():
|
||||
rmtree(python_scripts_path)
|
||||
return "Scripts目录移除成功"
|
||||
return "python\\Scripts目录不存在"
|
||||
except Exception as e:
|
||||
return repr(e)
|
||||
|
||||
def run(self, command, cwd=None):
|
||||
command = command_list[command]
|
||||
|
|
Loading…
Add table
Reference in a new issue