Show More
@@ -299,7 +299,7 b' def try_smtp_login(ui, smtp_obj, usernam' | |||||
299 | (username)) |
|
299 | (username)) | |
300 | smtp_obj.login(username, password) |
|
300 | smtp_obj.login(username, password) | |
301 | return True |
|
301 | return True | |
302 |
except smtplib.SMTPException |
|
302 | except smtplib.SMTPException as inst: | |
303 | if inst.smtp_code == 535: |
|
303 | if inst.smtp_code == 535: | |
304 | ui.status(_("SMTP login failed: %s\n\n") % inst.smtp_error) |
|
304 | ui.status(_("SMTP login failed: %s\n\n") % inst.smtp_error) | |
305 | return False |
|
305 | return False | |
@@ -350,10 +350,10 b' def keyring_supported_smtp(ui, username)' | |||||
350 | def send(sender, recipients, msg): |
|
350 | def send(sender, recipients, msg): | |
351 | try: |
|
351 | try: | |
352 | return s.sendmail(sender, recipients, msg) |
|
352 | return s.sendmail(sender, recipients, msg) | |
353 |
except smtplib.SMTPRecipientsRefused |
|
353 | except smtplib.SMTPRecipientsRefused as inst: | |
354 | recipients = [r[1] for r in inst.recipients.values()] |
|
354 | recipients = [r[1] for r in inst.recipients.values()] | |
355 | raise util.Abort('\n' + '\n'.join(recipients)) |
|
355 | raise util.Abort('\n' + '\n'.join(recipients)) | |
356 |
except smtplib.SMTPException |
|
356 | except smtplib.SMTPException as inst: | |
357 | raise util.Abort(inst) |
|
357 | raise util.Abort(inst) | |
358 |
|
358 | |||
359 | return send |
|
359 | return send |
General Comments 0
You need to be logged in to leave comments.
Login now