diff options
Diffstat (limited to 'Lib/getpass.py')
-rw-r--r-- | Lib/getpass.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/getpass.py b/Lib/getpass.py index dc02bd1..0044742 100644 --- a/Lib/getpass.py +++ b/Lib/getpass.py @@ -72,7 +72,7 @@ def unix_getpass(prompt='Password: ', stream=None): finally: termios.tcsetattr(fd, tcsetattr_flags, old) stream.flush() # issue7208 - except termios.error as e: + except termios.error: if passwd is not None: # _raw_input succeeded. The final tcsetattr failed. Reraise # instead of leaving the terminal in an unknown state. @@ -145,8 +145,6 @@ def getuser(): """ - import os - for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'): user = os.environ.get(name) if user: |