Never key error on bad flow pops..

basic_buy_bot
Tyler Goodlet 2023-06-26 16:00:16 -04:00
parent e7e7919a43
commit 4a8eafabb8
1 changed files with 4 additions and 1 deletions

View File

@ -90,4 +90,7 @@ class OrderDialogs(Struct):
for the given order id.
'''
return self._flows.pop(oid)
if (flow := self._flows.pop(oid, None)) is None:
log.warning(f'No flow found for oid: {oid}')
return flow