summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-06-11 21:38:39 +0000
committerWalter Dörwald <walter@livinglogic.de>2007-06-11 21:38:39 +0000
commit8d56e63638d9152547d8b6f8a4cbdba90cf91a33 (patch)
tree83d4a8386f707a68da6e39ed7897757eae27e063
parentb56a8f9ed0bfc43878362c0d08e7292b146f9b81 (diff)
downloadpython-setuptools-git-8d56e63638d9152547d8b6f8a4cbdba90cf91a33.tar.gz
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.
-rw-r--r--command/bdist_wininst.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py
index 5074a1a6..55d5d7e1 100644
--- a/command/bdist_wininst.py
+++ b/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"