Commit 844bd335 authored by Simon Beginn's avatar Simon Beginn 💻
Browse files

Autosave on timeout exit

parent 92c91c55
......@@ -175,7 +175,7 @@ def main(stdscr):
lastKey = stdscr.getkey()
# Process keyboard events
if(lastKey == 'q'):
raise KeyboardInterrupt
raise KeyboardInterrupt # Raise to escape the seconds while too
elif(lastKey == 'i'):
maxOpenTime += 30
elif(lastKey == 'd'):
......@@ -247,9 +247,10 @@ def main(stdscr):
eventWin.refresh()
eventList = eventList[-eventListLength:] # Drop too many events
except KeyboardInterrupt:
# Autosave on quit?
if args.autosave:
encryptFile(pathDcrpyr, pathEncPGP)
pass
# Autosave on quit?
if args.autosave:
encryptFile(pathDcrpyr, pathEncPGP)
shutil.rmtree(pathDcrpyr, ignore_errors=True)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment