mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-10 12:22:27 +03:00
repalced assert with log and continue
This commit is contained in:
parent
375573c0a8
commit
9710a5e9bb
@ -518,7 +518,13 @@ def worker() -> None:
|
|||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
this.discardedEvents = set(r.json())
|
this.discardedEvents = set(r.json())
|
||||||
this.discardedEvents.discard('Docked') # should_send() assumes that we send 'Docked' events
|
this.discardedEvents.discard('Docked') # should_send() assumes that we send 'Docked' events
|
||||||
assert this.discardedEvents # wouldn't expect this to be empty
|
if not this.discardedEvents:
|
||||||
|
logger.error(
|
||||||
|
'Unexpected empty discarded events list from EDSM. Bailing out of send: '
|
||||||
|
f'{type(this.discardedEvents)} -- {this.discardedEvents}'
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
# Filter out unwanted events
|
# Filter out unwanted events
|
||||||
pending = list(filter(lambda x: x['event'] not in this.discardedEvents, pending))
|
pending = list(filter(lambda x: x['event'] not in this.discardedEvents, pending))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user