[gnome-keysign: 72/75] sign-key: Require user input before quitting the app



commit 8526f44c1008cf887424a27d0f9fb2a6b12b465f
Author: Tobias Mueller <muelli cryptobitch de>
Date:   Fri Sep 22 16:00:40 2017 +0200

    sign-key: Require user input before quitting the app
    
    Three seconds might not be enough for the MUA to pick up the files. At
    least it's too long for my Evolution. We thus wait for the user to
    confirm quitting the application.

 keysign/gnome-keysign-sign-key.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/keysign/gnome-keysign-sign-key.py b/keysign/gnome-keysign-sign-key.py
index 7e44661..22342b9 100755
--- a/keysign/gnome-keysign-sign-key.py
+++ b/keysign/gnome-keysign-sign-key.py
@@ -22,6 +22,9 @@ from time import sleep
 
 from .util import sign_keydata_and_send
 
+if sys.version_info.major < 3:
+    input = raw_input
+
 def main(args):
     log = logging.getLogger(__name__)
     log.debug('Running main with args: %s', args)
@@ -31,10 +34,11 @@ def main(args):
         data = open(fname, 'r').read()
         log.info("Calling %r to sign %s", sign_keydata_and_send, fname)
         tmpfiles = list(sign_keydata_and_send(keydata=data))
-    log.info("Finished signing. Feel free to Quit the application. " +
-             "We're only waiting for a few seconds for the signature " +
-             "files to be picked up")
-    sleep(3)
+    log.info("Finished signing. " +
+             "We're only waiting for the signature " +
+             "files to be picked up. " +
+             "Press any key to quit the application.")
+    input()
 
 if __name__ == '__main__':
     logging.basicConfig(stream=sys.stderr, level=logging.DEBUG,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]