From a59d1f92aab8852bff807e8fb82a3acd9fa090e8 Mon Sep 17 00:00:00 2001 From: Timothyxxx <384084775@qq.com> Date: Fri, 10 May 2024 20:17:40 +0800 Subject: [PATCH] Improve the logic in auto-installation; Add auto-remove on the failed files --- desktop_env/envs/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop_env/envs/__init__.py b/desktop_env/envs/__init__.py index 870b674..470c203 100644 --- a/desktop_env/envs/__init__.py +++ b/desktop_env/envs/__init__.py @@ -12,7 +12,7 @@ import psutil import requests from tqdm import tqdm -__version__ = "0.1.8" +__version__ = "0.1.9" MAX_RETRY_TIMES = 10 UBUNTU_ARM_URL = "https://huggingface.co/datasets/xlangai/ubuntu_arm/resolve/main/Ubuntu.zip" @@ -95,6 +95,7 @@ class VirtualMachineManager: file.writelines(new_lines) # Check and clean on the files inside vms_dir, delete the unregistered ones + os.makedirs(vms_dir, exist_ok=True) vm_names = os.listdir(vms_dir) for vm_name in vm_names: # skip the downloaded .zip file