From 601144478910704bed926141735634087fcbb259 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 30 Mar 2016 01:45:00 +0800 Subject: [PATCH] gui: log error and bail out on artiq_gui.pyon write failure (#360) --- artiq/gui/state.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/artiq/gui/state.py b/artiq/gui/state.py index 8cead13f5..1e9be5532 100644 --- a/artiq/gui/state.py +++ b/artiq/gui/state.py @@ -74,5 +74,10 @@ class StateManager(TaskObject): while True: await asyncio.sleep(self.autosave_period) self.save() + except asyncio.CancelledError: + pass + except: + logger.error("Uncaught exception attempting to save state", + exc_info=True) finally: self.save()