m1n1.shell.HistoryConsole: Guard against mon.poll() exceptions

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-06-22 01:34:36 +09:00
parent 912776372a
commit 9a480c656b

View file

@ -36,7 +36,10 @@ class HistoryConsole(code.InteractiveConsole):
def runcode(self, code):
super().runcode(code)
if "mon" in self.locals:
self.locals["mon"].poll()
try:
self.locals["mon"].poll()
except Exception as e:
print(f"mon.poll() failed: {e!r}")
if "u" in self.locals:
self.locals["u"].push_simd()