SMTPError should be SMTPException; reported by Neal Norwitz.

This commit is contained in:
Fred Drake 2001-10-13 18:35:32 +00:00
parent f902296a18
commit 2f8f4d3678
1 changed files with 2 additions and 2 deletions

View File

@ -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:
(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'