Skip to content

Commit

Permalink
fix: 修复bug * 2
Browse files Browse the repository at this point in the history
  • Loading branch information
helloplhm-qwq committed Jan 7, 2024
1 parent 1b79ee6 commit ac59ad5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import sys

if (sys.version_info.major < 3 or sys.version_info.minor < 6):
if ((sys.version_info.major == 3 and sys.version_info.minor < 6) or sys.version_info.major == 2):
print('Python版本过低,请使用Python 3.6+ ')
sys.exit(1)

Expand All @@ -38,7 +38,7 @@ def handleResult(dic, status = 200):
aiologger = log.log('aiohttp_web')

stopEvent = None
if (sys.version_info.minor < 8):
if (sys.version_info.minor < 8 and sys.version_info.major == 3):
logger.warning('您使用的Python版本已经停止更新,不建议继续使用')
import concurrent
stopEvent = concurrent.futures._base.CancelledError
Expand Down
4 changes: 2 additions & 2 deletions modules/tx/refresh_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,18 @@ async def refresh():
else:
logger.error('未知的qqmusic_key格式')

if (config.read_config('module.tx.user.refresh_login.enable') and not variable.use_cookie_pool):
if (config.read_config('module.tx.refresh_login.enable') and not variable.use_cookie_pool):
# changed refresh login config path
txconfig = config.read_config('module.tx')
refresh_login_info = txconfig['refresh_login']
txconfig['user']['refresh_login'] = refresh_login_info
txconfig.pop('refresh_login')
config.write_config('module.tx', txconfig)

if (config.read_config('module.tx.user.refresh_login.enable') and not variable.use_cookie_pool):
scheduler.append('qqmusic_refresh_login', refresh,
config.read_config('module.tx.user.refresh_login.interval'))


async def refresh_login_for_pool(user_info):
if (user_info['qqmusic_key'].startswith('W_X')):
options = {
Expand Down

0 comments on commit ac59ad5

Please sign in to comment.