Replace list of constants with tuples of constants.

This commit is contained in:
Raymond Hettinger 2005-02-06 06:57:08 +00:00
parent 07ead17318
commit dbecd93b72
11 changed files with 29 additions and 29 deletions

View file

@ -578,7 +578,7 @@ class SMTP:
(code, resp) = self.docmd(encode_base64(password, eol=""))
elif authmethod is None:
raise SMTPException("No suitable authentication method found.")
if code not in [235, 503]:
if code not in (235, 503):
# 235 == 'Authentication successful'
# 503 == 'Error: already authenticated'
raise SMTPAuthenticationError(code, resp)