diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 3968275a..80eb0a7b 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -16,11 +16,10 @@ from sys import platform from time import localtime, strftime, time from typing import TYPE_CHECKING, Any, Mapping, Optional, Tuple, cast +from constants import applongname, appname, protocolhandler_redirect + # config will now cause an appname logger to be set up, so we need the # console redirect before this -appname = 'EDMarketConnector' # TODO: Must match config.appname, add test -applongname = 'E:D Market Connector' # TODO: Must match config.applongname, add test -protocolhandler_redirect = 'edmc://auth' # TODO: Must match protocolhandler.redirect, add test if __name__ == '__main__': def no_other_instance_running() -> bool: # noqa: CCR001 """ @@ -143,8 +142,8 @@ if __name__ == '__main__': # TODO: Test: Make *sure* this redirect is working, else py2exe is going to cause an exit popup # isort: off -import killswitch # noqa: E402 # Will cause a logging import/startup so needs to be after the redirect -from config import applongname, appname, appversion, appversion_nobuild, config, copyright # noqa: E402 +import killswitch # Will cause a logging import/startup so needs to be after the redirect +from config import appversion, appversion_nobuild, config, copyright # isort: on diff --git a/protocol.py b/protocol.py index af09fc14..b27c5438 100644 --- a/protocol.py +++ b/protocol.py @@ -7,6 +7,7 @@ import sys from EDMCLogging import get_main_logger from config import config +from constants import protocolhandler_redirect logger = get_main_logger()