Skip to content

Commit

Permalink
修复奇怪bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dd178 committed Apr 22, 2022
1 parent e736bf9 commit d7e33be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions judgement.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import logging
import aiohttp
import traceback
import platform
# import platform
from collections import OrderedDict

_debug = False
Expand Down Expand Up @@ -414,7 +414,8 @@ async def main(configData):
logging.error(f'配置加载异常,原因为{er},退出程序')
if _debug:
traceback.print_exc()
if platform.system().lower() == 'windows':
# if platform.system().lower() == 'windows': # 用户反应windows运行源代码时可能出现奇怪的问题
if sys.argv[0].split('.')[-1] == 'exe': # 故使用粗暴方式判断
import msvcrt
logging.info("按任意键退出")
ord(msvcrt.getch())
Expand Down

0 comments on commit d7e33be

Please sign in to comment.