mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 00:07:14 +03:00
protocol: Pay attention to config.auth_force_edmc_protocol
This commit is contained in:
parent
ae2bbc8929
commit
cf1655894b
17
protocol.py
17
protocol.py
@ -113,7 +113,13 @@ if sys.platform == 'darwin' and getattr(sys, 'frozen', False): # noqa: C901 # i
|
||||
protocolhandler.master.after(DarwinProtocolHandler.POLL, protocolhandler.poll) # type: ignore
|
||||
|
||||
|
||||
elif sys.platform == 'win32' and getattr(sys, 'frozen', False) and not is_wine and not config.auth_force_localserver:
|
||||
elif (config.auth_force_edmc_protocol
|
||||
or (
|
||||
sys.platform == 'win32'
|
||||
and getattr(sys, 'frozen', False)
|
||||
and not is_wine
|
||||
and not config.auth_force_localserver
|
||||
)):
|
||||
# spell-checker: words HBRUSH HICON WPARAM wstring WNDCLASS HMENU HGLOBAL
|
||||
from ctypes import windll # type: ignore
|
||||
from ctypes import POINTER, WINFUNCTYPE, Structure, byref, c_long, c_void_p, create_unicode_buffer, wstring_at
|
||||
@ -415,7 +421,14 @@ protocolhandler: GenericProtocolHandler
|
||||
if sys.platform == 'darwin' and getattr(sys, 'frozen', False):
|
||||
protocolhandler = DarwinProtocolHandler() # pyright: reportUnboundVariable=false
|
||||
|
||||
elif sys.platform == 'win32' and getattr(sys, 'frozen', False) and not is_wine and not config.auth_force_localserver:
|
||||
elif (
|
||||
sys.platform == 'win32'
|
||||
and config.auth_force_edmc_protocol or (
|
||||
getattr(sys, 'frozen', False)
|
||||
and not is_wine
|
||||
and not config.auth_force_localserver
|
||||
)
|
||||
):
|
||||
protocolhandler = WindowsProtocolHandler()
|
||||
else:
|
||||
protocolhandler = LinuxProtocolHandler()
|
||||
|
Loading…
x
Reference in New Issue
Block a user