diff -r 139b334c9392 -r 07b0a687c01a mercurial/mail.py --- a/mercurial/mail.py Thu Nov 26 02:28:42 2020 -0500 +++ b/mercurial/mail.py Mon Nov 23 11:47:06 2020 -0500 @@ -157,6 +157,8 @@ password = encoding.strfromlocal(password) else: password = ui.getpass() + if password is not None: + password = encoding.strfromlocal(password) if username and password: ui.note(_(b'(authenticating to mail server as %s)\n') % username) username = encoding.strfromlocal(username)