From 5d94ee7479abdaf303a67b9d5218698ee3fb9fb7 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 22 Jul 2021 13:21:58 -0400 Subject: [PATCH] Just warn for now on unknown dialogs --- piker/ui/order_mode.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/piker/ui/order_mode.py b/piker/ui/order_mode.py index 7b9eb7fe..38791b9f 100644 --- a/piker/ui/order_mode.py +++ b/piker/ui/order_mode.py @@ -505,7 +505,14 @@ async def run_order_mode( resp = msg['resp'] oid = msg['oid'] - dialog = mode.dialogs[oid] + dialog = mode.dialogs.get(oid) + if dialog is None: + log.warning(f'received msg for untracked dialog:\n{fmsg}') + + # TODO: enable pure tracking / mirroring of dialogs + # is desired. + continue + # record message to dialog tracking dialog.msgs[oid] = msg