mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
protocol: Work around incompatible types using conditional on wine_get_version
This commit is contained in:
parent
9a82874c7e
commit
165f55bba4
@ -21,7 +21,8 @@ is_wine = False
|
|||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
from ctypes import windll # type: ignore
|
from ctypes import windll # type: ignore
|
||||||
try:
|
try:
|
||||||
is_wine = windll.ntdll.wine_get_version
|
if windll.ntdll.wine_get_version:
|
||||||
|
is_wine = True
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -398,7 +399,7 @@ protocolhandler: GenericProtocolHandler
|
|||||||
if sys.platform == 'darwin' and getattr(sys, 'frozen', False):
|
if sys.platform == 'darwin' and getattr(sys, 'frozen', False):
|
||||||
protocolhandler = DarwinProtocolHandler() # pyright: reportUnboundVariable=false
|
protocolhandler = DarwinProtocolHandler() # pyright: reportUnboundVariable=false
|
||||||
|
|
||||||
elif sys.platform == 'win32' and getattr(sys, 'frozen', False) and not is_wine:
|
elif sys.platform == 'win32' and getattr(sys, 'frozen', False) and not is_wine and not config.auth_force_localserver:
|
||||||
protocolhandler = WindowsProtocolHandler()
|
protocolhandler = WindowsProtocolHandler()
|
||||||
else:
|
else:
|
||||||
protocolhandler = LinuxProtocolHandler()
|
protocolhandler = LinuxProtocolHandler()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user