mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-21 11:27:38 +03:00
Merge pull request #1601 from EDCD/fix/1598/eddn-fssisignaldiscovered-empty-array
eddn/fsssignaldiscovered: Catch where no signals pass checks
This commit is contained in:
commit
e70b51cf03
@ -1396,14 +1396,14 @@ class EDDN:
|
||||
f"{s['SystemAddress']} != {aug_systemaddress}")
|
||||
continue
|
||||
|
||||
# Remove any _Localised keys (would only be in a USS signal)
|
||||
s = filter_localised(s)
|
||||
|
||||
# Drop Mission USS signals.
|
||||
if "USSType" in s and s["USSType"] == "$USS_Type_MissionTarget;":
|
||||
logger.trace_if("plugin.eddn.fsssignaldiscovered", "USSType is $USS_Type_MissionTarget;, dropping")
|
||||
continue
|
||||
|
||||
# Remove any _Localised keys (would only be in a USS signal)
|
||||
s = filter_localised(s)
|
||||
|
||||
# Remove any key/values that shouldn't be there per signal
|
||||
s.pop('event', None)
|
||||
s.pop('horizons', None)
|
||||
@ -1413,6 +1413,12 @@ class EDDN:
|
||||
|
||||
msg['message']['signals'].append(s)
|
||||
|
||||
if not msg['message']['signals']:
|
||||
# No signals passed checks, so drop them all and return
|
||||
logger.debug('No signals after checks, so sending no message')
|
||||
self.fss_signals = []
|
||||
return None
|
||||
|
||||
# `horizons` and `odyssey` augmentations
|
||||
msg['message']['horizons'] = entry['horizons']
|
||||
msg['message']['odyssey'] = entry['odyssey']
|
||||
|
Loading…
x
Reference in New Issue
Block a user