Commit 8d56e636 authored by Walter Dörwald's avatar Walter Dörwald

Simplify various spots where: str() is called on something

that already is a string or the existence of the str class
is checked or a check is done for str twice. These all stem
from the initial unicode->str replacement.
parent b56a8f9e
......@@ -246,13 +246,8 @@ class bdist_wininst (Command):
file.write(bitmapdata)
# Convert cfgdata from unicode to ascii, mbcs encoded
try:
str
except NameError:
pass
else:
if isinstance(cfgdata, str):
cfgdata = cfgdata.encode("mbcs")
if isinstance(cfgdata, str):
cfgdata = cfgdata.encode("mbcs")
# Append the pre-install script
cfgdata = cfgdata + "\0"
......
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