summaryrefslogtreecommitdiff
path: root/Lib/getpass.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-02-27 21:23:31 +0000
committerFred Drake <fdrake@acm.org>2001-02-27 21:23:31 +0000
commit04d001e7e1ba1707d6d8c9db862f190a2aa6b470 (patch)
tree8f4d39933e529d78a8189f57e13d4f44a8d82309 /Lib/getpass.py
parentda0266d42812ade123b0409015ac6dc29c96a4fc (diff)
downloadcpython-04d001e7e1ba1707d6d8c9db862f190a2aa6b470.tar.gz
Get the needed constants from termios, not TERMIOS.
Diffstat (limited to 'Lib/getpass.py')
-rw-r--r--Lib/getpass.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/getpass.py b/Lib/getpass.py
index 840f7a0ca2..2b1f6b2625 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