From 54cd6b196e6695eb9d689add820cd53fa34e38d8 Mon Sep 17 00:00:00 2001 From: bgArray <474037765@qq.com> Date: Wed, 19 Apr 2023 21:45:43 +0800 Subject: [PATCH] update 2023/4/19 pypi update2 --- clean_update.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/clean_update.py b/clean_update.py index aa25e15..fe91aab 100644 --- a/clean_update.py +++ b/clean_update.py @@ -7,9 +7,24 @@ egg_info = [i for i in os.listdir() if i.endswith(".egg-info")][0] print(egg_info) # remove build, dist, logs, TrimLog.egg-info folders -shutil.rmtree("build") -shutil.rmtree("dist") -shutil.rmtree(egg_info) -shutil.rmtree("logs") +try: + shutil.rmtree("build") +except FileNotFoundError: + pass + +try: + shutil.rmtree("dist") +except FileNotFoundError: + pass + +try: + shutil.rmtree(egg_info) +except FileNotFoundError: + pass + +try: + shutil.rmtree("logs") +except FileNotFoundError: + pass print("Cleaned up!")