Skip to content

Commit 059aa2f

Browse files
committedMar 29, 2016
gui: do 6011444 properly
1 parent 010c68f commit 059aa2f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

Diff for: ‎artiq/gui/state.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,14 @@ def save(self):
7171

7272
async def _do(self):
7373
try:
74-
while True:
75-
await asyncio.sleep(self.autosave_period)
74+
try:
75+
while True:
76+
await asyncio.sleep(self.autosave_period)
77+
self.save()
78+
finally:
7679
self.save()
7780
except asyncio.CancelledError:
7881
pass
7982
except:
8083
logger.error("Uncaught exception attempting to save state",
8184
exc_info=True)
82-
finally:
83-
self.save()

0 commit comments

Comments
 (0)
Please sign in to comment.