Skip to content

Commit

Permalink
拒绝连接时不弹窗提示 (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Apr 13, 2024
1 parent d796e81 commit 11edc72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/view/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pyperclip

import asyncio
from aiohttp.client_exceptions import ClientConnectorError
from qasync import asyncClose, asyncSlot
import pygetwindow as gw
from PyQt5.QtCore import Qt, pyqtSignal, QSize
Expand Down Expand Up @@ -896,6 +897,9 @@ def exceptHook(self, ty, value, tb):
logger.error(call, "Crash")
logger.error("connector call_stack -------------- ↑", "Crash")

if ty in [ConnectionRefusedError, ClientConnectorError]:
return

w = ExceptionMessageBox(title, content, self.window())

if w.exec():
Expand Down

0 comments on commit 11edc72

Please sign in to comment.