From 60250e2859bd1e736e9a741f4c419002f6afcfd6 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 30 Aug 2001 15:07:44 +0000 Subject: win_getpass(): if sys.stdin is not sys.__stdin__, use default_getpass(). This should prevent hanging when it is called in IDLE. Fixes SF bug #455648. --- Lib/getpass.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Lib/getpass.py') diff --git a/Lib/getpass.py b/Lib/getpass.py index e811890e1e7..eefb1f95589 100644 --- a/Lib/getpass.py +++ b/Lib/getpass.py @@ -42,6 +42,8 @@ def unix_getpass(prompt='Password: '): def win_getpass(prompt='Password: '): """Prompt for password with echo off, using Windows getch().""" + if sys.stdin is not sys.__stdin__: + return default_getpass(prompt) import msvcrt for c in prompt: msvcrt.putch(c) -- cgit v1.2.3-65-gdbad