Commit Graph
109 Commits
Author SHA1 Message Date
Athanasius 6aa4ccaf90 plugins/edsm: Don't try to r.close(), that's not even valid 2021-04-01 14:45:50 +01:00
Athanasius 3d3674da5f plugins/edsm: Call requests.Session.close() after we've shutdown worker thread
This properly closes any sockets and avoids a -W default warning on
shutdown.
2021-04-01 14:45:50 +01:00
Athanasius 745c2ce8d2 edsm: Ensure Request handles are closed. 2021-04-01 14:45:50 +01:00
Athanasius db48b6eaad plugins/edsm: Avoid Tk event_generate() calls during shutdown
# Conflicts:
#	plugins/edsm.py
2021-04-01 14:45:48 +01:00
A_D b5a8c03980 Added missing whitespace 2021-04-01 14:45:48 +01:00
A_D b694bdc965 Added per-event killswitch 2021-04-01 14:45:48 +01:00
A_D 6374fbbeb8 Added event disabling
You can now disable specific event handlers in plugins
2021-04-01 14:45:47 +01:00
A_D 70087a27e4 Added total journal cutoff killswitches 2021-04-01 14:45:47 +01:00
A_D 8dca6783fc Fixed spelling, added utility methods 2021-04-01 14:45:47 +01:00
A_D d5b62d957b Added support for comments in kill switches 2021-04-01 14:45:47 +01:00
A_D 10ca50bf5a Moved edsm killswitch check
It was causing exit hangs when edsm was disabled
2021-04-01 14:45:47 +01:00
A_D 2d127ae3d0 Added docs, fixed incorrect kill switch names 2021-04-01 14:45:47 +01:00
A_D d81093760e Added hooks into killswitches in plugins 2021-04-01 14:45:47 +01:00
A_D 87df8d8ab8 suppressed exceptions in migration code 2021-04-01 14:45:46 +01:00
A_D 278480b99f replaced ors with defaults in config usage 2021-04-01 14:45:46 +01:00
Athanasius 25852997c5 Updated all source to use new config methods
# Conflicts:
#	monitor.py
2021-04-01 14:45:46 +01:00
Athanasius bd670b7ff1 Updated plugins to expect that CAPI data is safe
# Conflicts:
#	plugins/eddn.py
2021-04-01 14:45:45 +01:00
Athanasius 8aac704fa1 plugins/edsm: start/stop detailed logging. 2021-04-01 14:45:44 +01:00
Athanasius 462cd25312 config: Make config.shutting_down() a property, and change 'callers' 2021-01-11 16:54:09 +00:00
Athanasius bca0231dfc plugins/edsm: Avoid Tk event_generate() calls during shutdown 2021-01-11 16:45:26 +00:00
Athanasius 3d3baaea8e EDSM: Finer-grained and more detailed logging of API results 2020-10-01 11:47:31 +01:00
Athanasius a4b334dcfb EDSM: When we API call a Location event, log all events in that call. 2020-09-28 15:34:39 +01:00
Athanasius 1aba1a0596 Trace: Change several calls from debug to trace. 2020-09-23 22:07:18 +01:00
Athanasius 85d45aadd7 Place detailed logging for "Location" events.
To try and track down what's happening with #713
2020-09-23 11:45:48 +01:00
Athanasius a3b69fd94d Switch internal plugins to EDMCLogging.get_main_logger() 2020-09-22 16:20:05 +01:00
A_D c02b292f50 Removed uneeded list comps 2020-09-22 14:51:45 +02:00
A_D f8523e0a9f removed parens around tuple unpack 2020-09-22 14:49:24 +02:00
A_D e930911415 remove double assign 2020-09-22 14:49:23 +02:00
A_D 9710a5e9bb repalced assert with log and continue 2020-09-22 14:49:23 +02:00
A_D 375573c0a8 fixed docstrings 2020-09-22 14:49:22 +02:00
A_D 615a36452d Added docstrings 2020-09-22 14:49:22 +02:00
A_D 4a7cddc48b removed assert False 2020-09-22 14:48:54 +02:00
A_D 26be93f92e replaced magic number row with var 2020-09-22 14:48:53 +02:00
A_D fb080f8080 Removed unused imports 2020-09-22 14:48:53 +02:00
A_D 893cab3c23 cleaned up logic where possible 2020-09-22 14:48:52 +02:00
A_D f2add920c7 replaced constant contains checks with tuples 2020-09-22 14:48:52 +02:00
A_D 62f3203c3f Added type checker hint for unbound names
Due to the fact that cmdr and entry are only assigned if item exists, a
situation can arise where any access to the names will raise an
UnboundLocalException, this tells the type checker to ignore that
possibility by using a TYPE_CHECKING guarded assignment to those names.

This does not fix the issue at runtime, it just tells the type checker
that its fine. As this remains a bug, I have left TODOs in to note its
existence.
2020-09-22 14:48:51 +02:00
A_D 7ab697a807 Used default option for .get on dicts 2020-09-22 14:48:00 +02:00
A_D 25adf29779 Fixed possible error if credentials is None 2020-09-22 14:48:00 +02:00
A_D 2c2ade05e0 fixed some naming 2020-09-22 14:46:23 +02:00
A_D 20357b3deb replaced modulo formatting with fstrings 2020-09-22 14:46:22 +02:00
A_D 81c977d0da Added type annotations to functions 2020-09-22 14:46:22 +02:00
A_D 14617e72da cleaned up overlong lines 2020-09-22 14:43:24 +02:00
A_D 199e76701d Added line breaks around scope changes 2020-09-22 14:43:24 +02:00
A_D 743984eb11 Added fake definition for _
_ is added by magic in the plugin loading system, which means there are
no imports to indicate its existence to static analysis tools.
2020-09-22 14:41:34 +02:00
A_D d2a1f09fac sorted imports 2020-09-22 14:41:34 +02:00
A_D 37c53e233e autoformatted code with autopep8 2020-09-22 14:41:33 +02:00
Athanasius 0f12959d53 plugins/edsm: Also DEBUG log Location and Docked events. 2020-09-22 12:26:54 +01:00
Athanasius 0efe38540f Extend logging to FSDJump as well for ease of testing.
FSDJump happens, relatively, seldom enough to not be too spammy.
2020-09-18 15:33:18 +01:00
Athanasius 3f001a383f plugins/edsm: Add extra logging for CarrierJump events.
We've had reports about EDSM not updating for these, so add logging to
see if it's a bug our end.
2020-09-18 15:15:02 +01:00