Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
41e30183
Commit
41e30183
authored
Apr 21, 2008
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If sys.stdin is not a tty, fall back to default_getpass after printing
a warning instead of failing with a termios.error.
parent
aa3cadb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
Lib/getpass.py
Lib/getpass.py
+4
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/getpass.py
View file @
41e30183
...
...
@@ -24,6 +24,10 @@ def unix_getpass(prompt='Password: ', stream=None):
if
stream
is
None
:
stream
=
sys
.
stdout
if
not
sys
.
stdin
.
isatty
():
print
>>
sys
.
stderr
,
"Warning: sys.stdin is not a tty."
return
default_getpass
(
prompt
)
try
:
fd
=
sys
.
stdin
.
fileno
()
except
:
...
...
Misc/NEWS
View file @
41e30183
...
...
@@ -37,6 +37,9 @@ Extensions Modules
Library
-------
- getpass.getpass() now works when sys.stdin is not a tty by printing a warning
and falling back to sys.stdin.readline instead of raising termios.error.
- Issue #2014: Allow XML-RPC datetime objects to have dates before
1900-01-01.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment