Kaydet (Commit) 7fdfc2d2 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Replace '== None' with 'is None'

üst 79e39bd4
...@@ -27,7 +27,7 @@ class HMAC: ...@@ -27,7 +27,7 @@ class HMAC:
msg: Initial input for the hash, if provided. msg: Initial input for the hash, if provided.
digestmod: A module supporting PEP 247. Defaults to the md5 module. digestmod: A module supporting PEP 247. Defaults to the md5 module.
""" """
if digestmod == None: if digestmod is None:
import md5 import md5
digestmod = md5 digestmod = md5
......
...@@ -549,7 +549,7 @@ class SMTP: ...@@ -549,7 +549,7 @@ class SMTP:
elif authmethod == AUTH_PLAIN: elif authmethod == AUTH_PLAIN:
(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 is None:
raise SMTPException("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'
......
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