8000 gh-77065: Use `putwch` instead of `putch` in `getpass.win_getpass` (#… · python/cpython@52a7a22 · GitHub
[go: up one dir, main page]

Skip to content

Commit 52a7a22

Browse files
authored
gh-77065: Use putwch instead of putch in getpass.win_getpass (#134058)
1 parent 3f61ea3 commit 52a7a22

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/getpass.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ def win_getpass(prompt='Password: ', stream=None, *, echo_char=None):
119119
raise KeyboardInterrupt
120120
if c == '\b':
121121
if echo_char and pw:
122-
msvcrt.putch('\b')
123-
msvcrt.putch(' ')
124-
msvcrt.putch('\b')
122+
msvcrt.putwch('\b')
123+
msvcrt.putwch(' ')
124+
msvcrt.putwch('\b')
125125
pw = pw[:-1]
126126
else:
127127
pw = pw + c

0 commit comments

Comments
 (0)
0