From 47d0c81a2d446e03151b11e7da574fd20ed5b2de Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 21 Jan 2022 08:46:31 -0500 Subject: [PATCH] Only warn if trigger predicate was already popped --- piker/clearing/_ems.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/piker/clearing/_ems.py b/piker/clearing/_ems.py index 5096597f..e1017f64 100644 --- a/piker/clearing/_ems.py +++ b/piker/clearing/_ems.py @@ -256,7 +256,11 @@ async def clear_dark_triggers( # remove exec-condition from set log.info(f'removing pred for {oid}') - execs.pop(oid) + pred = execs.pop(oid, None) + if not pred: + log.warning( + f'pred for {oid} was already removed!?' + ) await ems_client_order_stream.send(msg)