From 45505af55bc3684e0393a1363b3b5ba4ad18a8d0 Mon Sep 17 00:00:00 2001 From: pooneyy <85266337+pooneyy@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:06:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=202.01=EF=BC=9Afix=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Utils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Utils.py b/Utils.py index ca3166e..c68bb02 100644 --- a/Utils.py +++ b/Utils.py @@ -270,12 +270,12 @@ def get_tenant_code(school_name: str) -> str: def set_accounts(): global DEFAULT_SCHOOL_NAME - with open("config.json", "r+", encoding='utf8') as file: - try:config = json.load(file) - except: - config = {} - config['TrueCaptcha'] = None - config['Accounts'] = [] + try: + with open("config.json", "r+", encoding='utf8') as file:config = json.load(file) + except: + config = {} + config['TrueCaptcha'] = None + config['Accounts'] = [] if config.get("TrueCaptcha") is None: print('验证码识别使用 TrueCaptcha.org,如果你想手动识别验证码,请按 Ctrl + C') try: