From d4bdc5905018ef27b5d471f40a40fe536802d748 Mon Sep 17 00:00:00 2001 From: Mufanc <47652878+Mufanc@users.noreply.github.com> Date: Sat, 4 Dec 2021 17:08:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=8F=E5=B0=91=E4=BA=86=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=9A=84=E7=AD=94=E9=A2=98=E7=94=A8=E6=97=B6=20=E4=BC=BC?= =?UTF-8?q?=E4=B9=8E=E4=BF=AE=E5=A4=8D=E3=80=8C=E6=A3=80=E6=B5=8B=E5=88=B0?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E4=B8=8E=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E7=AC=A6=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- automaton/devtools.py | 4 ++-- configs.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automaton/devtools.py b/automaton/devtools.py index 48f259b..1b62163 100644 --- a/automaton/devtools.py +++ b/automaton/devtools.py @@ -36,11 +36,11 @@ class Browser(object): spider_user = configs['user']['username'] logger.debug(f'spider: {spider_user}') logger.debug(f'iSmart client: {json.dumps(user_info, indent=4)}') - if spider_user != user_info['mobile'] and spider_user != user_info['username']: + if str(spider_user) != user_info['mobile'] and str(spider_user) != user_info['username']: logger.warning('检测到 iSmart 客户端中登录的账号与配置文件中账号不符!') choice = input('继续使用可能会出现意料之外的问题,是否继续?[y/N]') if choice.lower() != 'y': - return False + exit() else: logger.info('校验通过!') return True diff --git a/configs.yml b/configs.yml index 55280c8..8137c02 100644 --- a/configs.yml +++ b/configs.yml @@ -29,4 +29,4 @@ paper: defaults: pause # 未知题型的处理方式(暂停或使用默认得分) # defaults: [ 1, 1 ] - random-time: [ 90, 180 ] # 每道题的随机用时(秒) + random-time: [ 60, 120 ] # 每道题的随机用时(秒)