* Use appcmdname as the logger name so it looks different from the GUI
version. This also causes a different log filename in the rotated log
set.
* Log at DEBUG for Startup and Exiting. Which means replacing all of
the `sys.exit(EXIT_SUCCESS)` with `return` so we can log the Exit
after `main()` returns and then `sys.exit(EXIT_SUCCESS)` there.
`deep_get` will go down a list of keys on a dict to find either the
requested key or the default if somewhere along the line the given dict
doesn't have a given key
* Updater.__init__() now takes 'provider' argument to specify if we use
the internal checking code, or the available external code.
* EDMC.py changed to utilise this with internal provider.
* EDMarketConnector.py changed to use internal provider if not frozen,
else the internal provider.
* Corrected the darwin/MacOS toggling of auto updates checking to actually
use the Sparkle, not WinSparkle, API call.
* Updater.check_appcast() does the internal checking:
* class EDMCVersion to hold the information.
* Returns None on any error, or if it didn't find a newer version.
* Returns an EDMCVersion object if it found a newer version.
I got too enthusiastic in 3ff77c3c54dea4bf36d957cd2dbd5b1b02dcb094 when
I removed the "cut it down to A.BC" code. This restores the old output,
but using a less confusing if/else.
EDMC.py would break due to an import chain that ends up in theme. Theme
does a whole bunch of work to setup our GUI for EDMarketConnector.py,
but it does this on any import, which will fail spectacularly if there
is either no DISPLAY var set or no X11 libs available on our machine at
all (as a sidenote this means it probably also breaks on a wholly
wayland install).
This fixes the issue by adding a check for an environment variable on
import of theme. This can and WILL break if the env var is set and
EDMarketConnector.py is used, but if you do that its your own fault.
* I neglected to `import re` when I changed the Journal file name check.
* `map` isn't comparable in Python 3.7, need to `list()` it as well.
* Just print the full `appversion`. The old code was assuming that none of
A, B, C, D in A.B.C.D would be two or more digits.
close#566
A user accidentally copied a Journal file into the same directory, resulting in
a "Journal.<datetime>.<serial> - Copy.log" file. EDMC 3.99.0.0 then picked this
up and re-sent events to EDDN, EDSM, Inara.
So, let's be strict about the filenames we consider to be valid, live, Journal
files.
* Journal files have one basic form: Journal.YYMMDDHHMMSS.XX.log
* In addition the word 'Beta' can be inserted just after 'Journal'
So regex '^Journal(Beta)?\.[0-9]{12}\.[0-9]{2}\.log$' matches both and nothing
else.
Test: The "copy to same directory" that originally triggered this. EDMC no
longer 'sees' the copy.
Test: Copied a Journal file out, renamed it to later date/time, copied that
back in. EDMC saw it correctly as a new file.
NB: Didn't test the "no emitter" version at monitor.py:251, but no reason to
think it won't also work.
closes#546