Replace '== None' with 'is None'

This commit is contained in:
Raymond Hettinger 2002-05-31 17:49:10 +00:00
parent 79e39bd4d0
commit 7fdfc2d231
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ class HMAC:
msg: Initial input for the hash, if provided.
digestmod: A module supporting PEP 247. Defaults to the md5 module.
"""
if digestmod == None:
if digestmod is None:
import md5
digestmod = md5

View File

@ -549,7 +549,7 @@ class SMTP:
elif authmethod == AUTH_PLAIN:
(code, resp) = self.docmd("AUTH",
AUTH_PLAIN + " " + encode_plain(user, password))
elif authmethod == None:
elif authmethod is None:
raise SMTPException("No suitable authentication method found.")
if code not in [235, 503]:
# 235 == 'Authentication successful'