Skip to content

Commit 0622d7e

Browse files
committed
Never key error on bad flow pops..
1 parent e322e5e commit 0622d7e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

piker/clearing/_util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,7 @@ def pop(
9090
for the given order id.
9191
9292
'''
93-
return self._flows.pop(oid)
93+
if (flow := self._flows.pop(oid, None)) is None:
94+
log.warning(f'No flow found for oid: {oid}')
95+
96+
return flow

0 commit comments

Comments
 (0)