From 2ac87e4ad652965d2354eb8a6e87a2adea023028 Mon Sep 17 00:00:00 2001 From: Aaron3S Date: Fri, 12 Apr 2024 11:31:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E7=9A=84=E5=88=A0=E9=99=A4=E7=9B=AE=E5=BD=95=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/automations/base/manager.py | 2 +- apps/jumpserver/settings/base.py | 2 +- apps/terminal/automations/deploy_applet_host/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/assets/automations/base/manager.py b/apps/assets/automations/base/manager.py index 98e8690f0..656c6751b 100644 --- a/apps/assets/automations/base/manager.py +++ b/apps/assets/automations/base/manager.py @@ -314,7 +314,7 @@ class BasePlaybookManager: def delete_runtime_dir(self): if settings.DEBUG_DEV: return - shutil.rmtree(self.runtime_dir) + shutil.rmtree(self.runtime_dir, ignore_errors=True) def run(self, *args, **kwargs): print(">>> 任务准备阶段\n") diff --git a/apps/jumpserver/settings/base.py b/apps/jumpserver/settings/base.py index 0a21bd34f..a17c48bfc 100644 --- a/apps/jumpserver/settings/base.py +++ b/apps/jumpserver/settings/base.py @@ -39,7 +39,7 @@ PROJECT_DIR = const.PROJECT_DIR APPS_DIR = os.path.join(PROJECT_DIR, 'apps') DATA_DIR = os.path.join(PROJECT_DIR, 'data') SHARE_DIR = os.path.join(DATA_DIR, 'share') -ANSIBLE_DIR = os.path.join(DATA_DIR, 'ansible') +ANSIBLE_DIR = os.path.join(SHARE_DIR, 'ansible') CERTS_DIR = os.path.join(DATA_DIR, 'certs') # Quick-start development settings - unsuitable for production diff --git a/apps/terminal/automations/deploy_applet_host/__init__.py b/apps/terminal/automations/deploy_applet_host/__init__.py index 2ab3f13a0..623be3dea 100644 --- a/apps/terminal/automations/deploy_applet_host/__init__.py +++ b/apps/terminal/automations/deploy_applet_host/__init__.py @@ -145,7 +145,7 @@ class DeployAppletHostManager: def delete_runtime_dir(self): if settings.DEBUG_DEV: return - shutil.rmtree(self.run_dir) + shutil.rmtree(self.run_dir, ignore_errors=True) def _run(self, cb_func: callable, **kwargs): try: