bpo-34850: Replace is with == in idlelib.iomenu (GH-9649)

Patch by Serhiy Storchaka (in PR GH-9642).
(cherry picked from commit 5fa247d60d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Islington (bot) 2018-09-30 14:35:53 -07:00 committed by GitHub
parent 0f161b3079
commit 214c0b3d15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ else:
# resulting codeset may be unknown to Python. We ignore all
# these problems, falling back to ASCII
locale_encoding = locale.nl_langinfo(locale.CODESET)
if locale_encoding is None or locale_encoding is '':
if locale_encoding is None or locale_encoding == '':
# situation occurs on Mac OS X
locale_encoding = 'ascii'
codecs.lookup(locale_encoding)
@ -50,7 +50,7 @@ else:
# bugs that can cause ValueError.
try:
locale_encoding = locale.getdefaultlocale()[1]
if locale_encoding is None or locale_encoding is '':
if locale_encoding is None or locale_encoding == '':
# situation occurs on Mac OS X
locale_encoding = 'ascii'
codecs.lookup(locale_encoding)