mirror of
https://github.com/python/cpython.git
synced 2026-10-28 10:25:05 +08:00
gh-77065: Use putwch instead of putch in getpass.win_getpass (#134058)
This commit is contained in:
1 parent
3f61ea3add
commit
52a7a22a6b
1 file changed
+3
-3
+3
-3
@@ -119,9 +119,9 @@ def win_getpass(prompt='Password: ', stream=None, *, echo_char=None):
|
||||
raise KeyboardInterrupt
|
||||
if c == '\b':
|
||||
if echo_char and pw:
|
||||
msvcrt.putch('\b')
|
||||
msvcrt.putch(' ')
|
||||
msvcrt.putch('\b')
|
||||
msvcrt.putwch('\b')
|
||||
msvcrt.putwch(' ')
|
||||
msvcrt.putwch('\b')
|
||||
pw = pw[:-1]
|
||||
else:
|
||||
pw = pw + c
|
||||
|
||||
Reference in new issue
Block a user