* In trying to fix the return type 'exception' I first decided to properly
prototype GetMessageW().
* But it turns out that you just can't get rid of that exception, so I just
added a comment about it being harmless, because the functionality works
as intended anyway.
Given this is the form of definition in the official Python docs I'm
wondering if this only ever worked on 32-bit by accident.
So, it was nothing to do with the type needing to be changed for 64-bit.
The error:
ctypes.ArgumentError: argument 4: <class 'OverflowError'>: int too long to convert
was a red herring in those terms.
* 'type: ignore' some ctypes operations on variables.
* Use `c_long(<value>)` on some returns. The ctypes types do work that way
as constructors.
* Fix the BAseHTTPHandler.log_request() types to match superclass.
In general, doing things like this on import is bad, but this was
changed specifically to remove a bug that causes
--force-localserver-auth to do nothing.
That is caused because while we were careful not to import protocol
until after we were done doing arg things, we did not check to make sure
something else didn't. Companion imports protocol, which thus always
instantiates WindowsProtocolHandler before we can modify some config
state to indicate that we want LinuxProtocolHandler.
* A lot of this is commented out. It might be useful in the future, but
is just too noisy for now.
* Changed the protocol webserver to info, as it is.
* Left the EDSM 'not 1XX, 2XX or 5XX' in as it's a warning, so 'pass's
on the conditional bodies that would be empty now trace's are
commented.
1. So now they're only defined in one place.
2. config.py does an import of them, and `from config import ...` then
chains through, so no need to update other users.
3. No need to ' # noqa E402' the killswitch/config imports now.
Tested with a build/install and run with:
"c:\Program Files (x86)\EDMarketConnector\EDMarketConnector.exe" --force-localserver-for-auth --trace
2021-01-22 12:57:11.020 - TRACE - protocol.ProtocolHandler.__init__:222: Web ser
ver listening on http://localhost:53657/auth