spit out tons of Python crap aka traceback
new[3] = new[3] & ~termios.ECHO; # lflags
try:
termios.tcsetattr(fd, termios.TCSADRAIN, new);
- passwd = raw_input(prompt);
+ try:
+ passwd = raw_input(prompt);
+ except KeyboardInterrupt:
+ termios.tcsetattr(fd, termios.TCSADRAIN, old);
+ print
+ sys.exit(0)
+ except EOFError:
+ passwd = ""
finally:
termios.tcsetattr(fd, termios.TCSADRAIN, old);
print;