1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-06-20 00:34:07 +03:00

Merge pull request #1252 from norohind/fix/1251/edsm-trace_if-exceptions

plugins/edsm.py: fix exception on logger.trace_on
This commit is contained in:
Athanasius 2021-08-17 12:07:20 +01:00 committed by GitHub
commit 204d0429cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -685,6 +685,8 @@ def worker() -> None: # noqa: CCR001 C901 # Cant be broken up currently
if any(p for p in pending if p['event'] in ('CarrierJump', 'FSDJump', 'Location', 'Docked')): if any(p for p in pending if p['event'] in ('CarrierJump', 'FSDJump', 'Location', 'Docked')):
data_elided = data.copy() data_elided = data.copy()
data_elided['apiKey'] = '<elided>' data_elided['apiKey'] = '<elided>'
data_elided['message'] = data_elided['message'].decode('utf-8')
data_elided['commanderName'] = data_elided['commanderName'].decode('utf-8')
logger.trace_if( logger.trace_if(
'journal.locations', 'journal.locations',
"pending has at least one of ('CarrierJump', 'FSDJump', 'Location', 'Docked')" "pending has at least one of ('CarrierJump', 'FSDJump', 'Location', 'Docked')"