Currently it is simply a dict subclass that does some of the cleanup
required to make everything happy. In future it will be changed to be a
NamedTuple or similar that can be typed
* This is now done even before the stdout/err redirect.
* The function is now called no_other_instance_running() to make the
conditional use of it read more naturally.
* For now this *append* logs to the plain log file. **BUT** any
subsequent write by the already-running process will be over the top
of this, so a future commit will use a popup instead.
# Conflicts:
# EDMarketConnector.py
1) Don't log in this check, we're a different process.
2) But we've stomped the plain log file already!
3) Python 3.8.6 seems to not like sys.exit(0) from that ctypes code, so
`return False` instead and check the return from EnumWindows().
* The new_worker/NewThis doesn't currently have a mechanism to ask the
new_worker to exit. It's relying on being a daemon thread and dying
once all non-daemon (i.e. main) threads have exited.
Relatively simple. Because all of our loggers are created out of
EDMCLogging, we can create a fake type in EDMCLogging that inherits
from logging.Logger but also defines a trace method.
Once that is done, we just have to annotate our methods to get loggers
with the new type, cast all of the returns, and suddenly we no longer
have any complaints about logger.trace. This doesn't _actually_ change
any behaviour at runtime, and logging.Logger.trace and logging.TRACE
will continue to be broken, but those are used far less than
logger.trace is used throughout the codebase, and therefore I think we
can live with `# type: ignore` comments everywhere
I failed to realise the values I'd moved earlier in the conditional were
being passed by reference to the ctypes call. Thus they had initial
values only upon test, rather than the 'returned' values as they should.
This caused no values to be loaded from the Registry!
* u-prefix is un-necessary, remove it.
* We should get ValueError in some cases, so catch it first.
* Change debug log for if linux config file not yet present.