summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-06-11 21:38:39 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-06-11 21:38:39 (GMT)
commit5de48bdd195b14426c772b4c61290aef7f33e3ec (patch)
treee4411088f62f76b183b18d543b4c4b64d4076d65 /Lib/distutils
parent80bfb725af0809308264d526ac6a024fc8386643 (diff)
downloadcpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.zip
cpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.tar.gz
cpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.tar.bz2
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.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/command/bdist_wininst.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index 5074a1a..55d5d7e 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -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"