From 1191d0148fc971cd8516b80f58b42910af88cd54 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 27 Feb 2001 21:23:31 +0000 Subject: Get the needed constants from termios, not TERMIOS. --- Lib/getpass.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Lib/getpass.py') diff --git a/Lib/getpass.py b/Lib/getpass.py index 840f7a0ca2f..2b1f6b2625b 100644 --- a/Lib/getpass.py +++ b/Lib/getpass.py @@ -30,12 +30,12 @@ def unix_getpass(prompt='Password: '): old = termios.tcgetattr(fd) # a copy to save new = old[:] - new[3] = new[3] & ~TERMIOS.ECHO # 3 == 'lflags' + new[3] = new[3] & ~termios.ECHO # 3 == 'lflags' try: - termios.tcsetattr(fd, TERMIOS.TCSADRAIN, new) + termios.tcsetattr(fd, termios.TCSADRAIN, new) passwd = _raw_input(prompt) finally: - termios.tcsetattr(fd, TERMIOS.TCSADRAIN, old) + termios.tcsetattr(fd, termios.TCSADRAIN, old) sys.stdout.write('\n') return passwd @@ -103,7 +103,7 @@ def getuser(): # Bind the name getpass to the appropriate function try: - import termios, TERMIOS + import termios except ImportError: try: import msvcrt -- cgit v1.2.3