Commits

Anonymous committed 857f5dd

Use returncode 2 when keyring cancelled.

  • Participants
  • Parent commits 72870f7

Comments (0)

Files changed (1)

 def _exit(ec):
     """Exit with additional check if autostart file is still needed."""
 
-    _autostart(_get_items(amount="y"))
+    if ec != 2:
+        _autostart(_get_items(amount="y"))
     sys.exit(ec)
 
 def _proceed(msg):
     
 if __name__ == '__main__':
 
-    ret = main()
-    _exit(int(not ret))
+    try:
+        ret = int(not main())
+    except gk.CancelledError:
+        ret = 2
+    _exit(ret)