Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 438f464

Browse files
[3.14] gh-77065: Use putwch instead of putch in getpass.win_getpass (GH-134058) (#134059)
gh-77065: Use `putwch` instead of `putch` in `getpass.win_getpass` (GH-134058) (cherry picked from commit 52a7a22) Co-authored-by: Semyon Moroz <[email protected]>
1 parent 31deafb commit 438f464

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)