Commit 2f8f4d36 authored by Fred Drake's avatar Fred Drake

SMTPError should be SMTPException; reported by Neal Norwitz.

parent f902296a
...@@ -485,7 +485,7 @@ class SMTP: ...@@ -485,7 +485,7 @@ class SMTP:
the helo greeting. the helo greeting.
SMTPAuthenticationError The server didn't accept the username/ SMTPAuthenticationError The server didn't accept the username/
password combination. password combination.
SMTPError No suitable authentication method was SMTPException No suitable authentication method was
found. found.
""" """
...@@ -537,7 +537,7 @@ class SMTP: ...@@ -537,7 +537,7 @@ class SMTP:
(code, resp) = self.docmd("AUTH", (code, resp) = self.docmd("AUTH",
AUTH_PLAIN + " " + encode_plain(user, password)) AUTH_PLAIN + " " + encode_plain(user, password))
elif authmethod == None: elif authmethod == None:
raise SMTPError("No suitable authentication method found.") raise SMTPException("No suitable authentication method found.")
if code not in [235, 503]: if code not in [235, 503]:
# 235 == 'Authentication successful' # 235 == 'Authentication successful'
# 503 == 'Error: already authenticated' # 503 == 'Error: already authenticated'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment