Skip to content

Commit

Permalink
gui: do 6011444 properly
Browse files Browse the repository at this point in the history
sbourdeauducq committed Mar 29, 2016
1 parent b64cea0 commit 72da5cc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions artiq/gui/state.py
Original file line number Diff line number Diff line change
@@ -71,13 +71,14 @@ def save(self):

async def _do(self):
try:
while True:
await asyncio.sleep(self.autosave_period)
try:
while True:
await asyncio.sleep(self.autosave_period)
self.save()
finally:
self.save()
except asyncio.CancelledError:
pass
except:
logger.error("Uncaught exception attempting to save state",
exc_info=True)
finally:
self.save()

0 comments on commit 72da5cc

Please sign in to comment.