diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-11-20 23:15:54 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-11-20 23:15:54 (GMT) |
commit | 201626e00f87a514b4891a65f3014bcb49c5dc88 (patch) | |
tree | 241813a9d96ed0b4b79b5320bdd6b553ffc95a52 /Lib/getpass.py | |
parent | 10263d6e6b14fb55bca63735f2508ee8e269526c (diff) | |
download | cpython-201626e00f87a514b4891a65f3014bcb49c5dc88.zip cpython-201626e00f87a514b4891a65f3014bcb49c5dc88.tar.gz cpython-201626e00f87a514b4891a65f3014bcb49c5dc88.tar.bz2 |
Fix SF #640094, on win32 getpass runs into unix_getpass
Make sure we have a UNIX-compatible termios.
Apparently, McMillan Installer made a termios on windows
which caused unix_getpass() to be used instead of win_getpass().
Will backport.
Diffstat (limited to 'Lib/getpass.py')
-rw-r--r-- | Lib/getpass.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/getpass.py b/Lib/getpass.py index eefb1f9..e96491f 100644 --- a/Lib/getpass.py +++ b/Lib/getpass.py @@ -104,7 +104,10 @@ def getuser(): # Bind the name getpass to the appropriate function try: import termios -except ImportError: + # it's possible there is an incompatible termios from the + # McMillan Installer, make sure we have a UNIX-compatible termios + termios.tcgetattr, termios.tcsetattr +except (ImportError, AttributeError): try: import msvcrt except ImportError: |