##// END OF EJS Templates
py3: decode username and password before SMTP login...
Denis Laxalde -
r43442:9145abd8 default
parent child Browse files
Show More
@@ -145,10 +145,14 b' def _smtp(ui):'
145 sslutil.validatesocket(s.sock)
145 sslutil.validatesocket(s.sock)
146 username = ui.config(b'smtp', b'username')
146 username = ui.config(b'smtp', b'username')
147 password = ui.config(b'smtp', b'password')
147 password = ui.config(b'smtp', b'password')
148 if username and not password:
148 if username:
149 if password:
150 password = encoding.strfromlocal(password)
151 else:
149 password = ui.getpass()
152 password = ui.getpass()
150 if username and password:
153 if username and password:
151 ui.note(_(b'(authenticating to mail server as %s)\n') % username)
154 ui.note(_(b'(authenticating to mail server as %s)\n') % username)
155 username = encoding.strfromlocal(username)
152 try:
156 try:
153 s.login(username, password)
157 s.login(username, password)
154 except smtplib.SMTPException as inst:
158 except smtplib.SMTPException as inst:
General Comments 0
You need to be logged in to leave comments. Login now