Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
修复关于uvloop是否已安装的逻辑错误 #103
Browse files Browse the repository at this point in the history
  • Loading branch information
ERZATZ Type AK9 authored May 14, 2023
1 parent 59b0944 commit 8793c8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mys_goods_tool/tui.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def _on_mount(self, _: events.Mount) -> None:
TuiApp.text_log_writer = TuiApp.TextLogWriter()
logger.add(self.text_log_writer, diagnose=False, level="DEBUG", format=LOG_FORMAT)
if sys.platform not in ('win32', 'cygwin', 'cli'):
if "uvloop" not in sys.modules.copy():
if "uvloop" in sys.modules.copy():
import uvloop
import asyncio
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
Expand Down

0 comments on commit 8793c8b

Please sign in to comment.