Commit 5fa247d6 authored by Terry Jan Reedy's avatar Terry Jan Reedy Committed by GitHub

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

Patch by Serhiy Storchaka (in PR #9642).
parent 2a2940e5
......@@ -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)
......
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