mercurial/mail.py
changeset 9246 2de7d96593db
parent 8343 6fbbb90261b1
child 9715 f0e99a2eac76
--- a/mercurial/mail.py	Sat Jul 25 19:04:08 2009 -0500
+++ b/mercurial/mail.py	Mon Jul 27 02:27:24 2009 +0200
@@ -36,7 +36,10 @@
     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: