]> granicus.if.org Git - python/commitdiff
Replace '== None' with 'is None'
authorRaymond Hettinger <python@rcn.com>
Fri, 31 May 2002 17:49:10 +0000 (17:49 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 31 May 2002 17:49:10 +0000 (17:49 +0000)
Lib/hmac.py
Lib/smtplib.py

index cae08002e55dfaa909dd00cd3f695a459415f907..c9e4ae80478606c3868113301d325dff6f3a0176 100644 (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
 
index bb8fd75e8eb822fb30da1a27545489c9565222ba..80e6508281dd32ed5cd0a11293f27b86100559f2 100755 (executable)
@@ -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'