Replace '== None' with 'is None'
This commit is contained in:
parent
79e39bd4d0
commit
7fdfc2d231
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue