Skip to content

Commit b6b822f

Browse files
committed
remove len check
1 parent 501d704 commit b6b822f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Lib/getpass.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ def fallback_getpass(prompt='Password: ', stream=None):
146146

147147
def _check_echochar(echochar):
148148
# ASCII excluding control characters
149-
if echochar and not (len(echochar) == 1 and
150-
echochar.isprintable() and
151-
echochar.isascii()):
149+
if echochar and not (echochar.isprintable() and echochar.isascii()):
152150
raise ValueError(f"'echochar' must be ASCII, got: {echochar!r}")
153151

154152

0 commit comments

Comments
 (0)