Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7fdfc2d

Browse files
committed
Replace '== None' with 'is None'
1 parent 79e39bd commit 7fdfc2d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/hmac.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(self, key, msg = None, digestmod = None):
2727
msg: Initial input for the hash, if provided.
2828
digestmod: A module supporting PEP 247. Defaults to the md5 module.
2929
"""
30-
if digestmod == None:
30+
if digestmod is None:
3131
import md5
3232
digestmod = md5
3333

Lib/smtplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ def encode_plain(user, password):
549549
elif authmethod == AUTH_PLAIN:
550550
(code, resp) = self.docmd("AUTH",
551551
AUTH_PLAIN + " " + encode_plain(user, password))
552-
elif authmethod == None:
552+
elif authmethod is None:
553553
raise SMTPException("No suitable authentication method found.")
554554
if code not in [235, 503]:
555555
# 235 == 'Authentication successful'

0 commit comments

Comments
 (0)