diff --git a/Musicreater.py b/Musicreater.py index 4f2e0b4..5412d93 100644 --- a/Musicreater.py +++ b/Musicreater.py @@ -230,6 +230,7 @@ def __main__(): if clearLog: print(READABLETEXT[2]) + err = True try: if os.path.exists('./log/'): shutil.rmtree('./log/') @@ -237,8 +238,12 @@ def __main__(): shutil.rmtree('./logs/') if os.path.exists('./cache/'): shutil.rmtree('./cache/') + err = False except ZeroDivisionError: # 程序规范修改:根据新的语法标准:except后面不能没有错误类型,所以既然是pass就随便填一个错误 print(READABLETEXT[3]) + finally: + if err is True: + print(READABLETEXT[3]) exit()