mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
email: Catch exceptions during send.
Catch SMTPlib exceptions to avoid mercurial showing a backtrace during an e.g. authentication error.
This commit is contained in:
parent
56469b1da7
commit
7322d10ac4
@ -36,7 +36,10 @@ def _smtp(ui):
|
||||
if username and password:
|
||||
ui.note(_('(authenticating to mail server as %s)\n') %
|
||||
(username))
|
||||
s.login(username, password)
|
||||
try:
|
||||
s.login(username, password)
|
||||
except smtplib.SMTPException, inst:
|
||||
raise util.Abort(inst)
|
||||
|
||||
def send(sender, recipients, msg):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user