[30261] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Fix k5test prompts for Python 3

daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Jul 26 10:42:01 2018

Date: Thu, 26 Jul 2018 10:41:54 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201807261441.w6QEfsuU027069@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/297535b72177dcced036b78107e9d0e37781c7a3
commit 297535b72177dcced036b78107e9d0e37781c7a3
Author: Greg Hudson <ghudson@mit.edu>
Date:   Wed Jul 25 11:50:02 2018 -0400

    Fix k5test prompts for Python 3
    
    With Python 3, sys.stdout.write() of a partial line followed by
    sys.stdin.readline() does not display the partial line.  Add explicit
    flushes to make prompts visible in k5test.py.
    
    ticket: 8710

 src/util/k5test.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/util/k5test.py b/src/util/k5test.py
index 848eb02..6001246 100644
--- a/src/util/k5test.py
+++ b/src/util/k5test.py
@@ -468,6 +468,7 @@ def _onexit():
     if _debug or _stop_before or _stop_after or _shell_before or _shell_after:
         # Wait before killing daemons in case one is being debugged.
         sys.stdout.write('*** Press return to kill daemons and exit script: ')
+        sys.stdout.flush()
         sys.stdin.readline()
     for proc in _daemons:
         os.kill(proc.pid, signal.SIGTERM)
@@ -669,6 +670,7 @@ def _valgrind(args):
 def _stop_or_shell(stop, shell, env, ind):
     if (_match_cmdnum(stop, ind)):
         sys.stdout.write('*** [%d] Waiting for return: ' % ind)
+        sys.stdout.flush()
         sys.stdin.readline()
     if (_match_cmdnum(shell, ind)):
         output('*** [%d] Spawning shell\n' % ind, True)
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post