Commit 7fdfc2d2 authored by Raymond Hettinger's avatar Raymond Hettinger

Replace '== None' with 'is None'

parent 79e39bd4
......@@ -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
......
......@@ -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'
......
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