##// END OF EJS Templates
ui: ensure `getpass()` returns bytes...
Matt Harbison -
r47013:07b0a687 stable
parent child Browse files
Show More
@@ -3787,6 +3787,10 b' def debugtemplate(ui, repo, tmpl, **opts'
3787 3787 def debuguigetpass(ui, prompt=b''):
3788 3788 """show prompt to type password"""
3789 3789 r = ui.getpass(prompt)
3790 if r is not None:
3791 r = encoding.strtolocal(r)
3792 else:
3793 r = b"<default response>"
3790 3794 ui.writenoi18n(b'response: %s\n' % r)
3791 3795
3792 3796
@@ -157,6 +157,8 b' def _smtp(ui):'
157 157 password = encoding.strfromlocal(password)
158 158 else:
159 159 password = ui.getpass()
160 if password is not None:
161 password = encoding.strfromlocal(password)
160 162 if username and password:
161 163 ui.note(_(b'(authenticating to mail server as %s)\n') % username)
162 164 username = encoding.strfromlocal(username)
@@ -1735,7 +1735,7 b' class ui(object):'
1735 1735 raise EOFError
1736 1736 return l.rstrip(b'\n')
1737 1737 else:
1738 return getpass.getpass('')
1738 return encoding.strtolocal(getpass.getpass(''))
1739 1739 except EOFError:
1740 1740 raise error.ResponseExpected()
1741 1741
General Comments 0
You need to be logged in to leave comments. Login now