mirror of
https://github.com/python/cpython.git
synced 2025-08-24 02:35:59 +00:00
Remove redundant imports.
This commit is contained in:
parent
c53ae58954
commit
54540ec917
7 changed files with 6 additions and 12 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue