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 ] # 每道题的随机用时(秒)