summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/bdist_wininst.py
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2011-02-25 15:42:01 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2011-02-25 15:42:01 (GMT)
commit8f36af7a4c9409a673412e4bdfbad76d700abc3a (patch)
tree1b61599a07604a96539e98098b055c577cd7e6a8 /Lib/distutils/command/bdist_wininst.py
parenta391b11320f729f6eec6c772c00b3e62c2746eaf (diff)
downloadcpython-8f36af7a4c9409a673412e4bdfbad76d700abc3a.zip
cpython-8f36af7a4c9409a673412e4bdfbad76d700abc3a.tar.gz
cpython-8f36af7a4c9409a673412e4bdfbad76d700abc3a.tar.bz2
Normalize the encoding names for Latin-1 and UTF-8 to
'latin-1' and 'utf-8'. These are optimized in the Python Unicode implementation to result in more direct processing, bypassing the codec registry. Also see issue11303.
Diffstat (limited to 'Lib/distutils/command/bdist_wininst.py')
-rw-r--r--Lib/distutils/command/bdist_wininst.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index b2e2fc6..b886055 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -263,11 +263,11 @@ class bdist_wininst(Command):
cfgdata = cfgdata + b"\0"
if self.pre_install_script:
# We need to normalize newlines, so we open in text mode and
- # convert back to bytes. "latin1" simply avoids any possible
+ # convert back to bytes. "latin-1" simply avoids any possible
# failures.
with open(self.pre_install_script, "r",
- encoding="latin1") as script:
- script_data = script.read().encode("latin1")
+ encoding="latin-1") as script:
+ script_data = script.read().encode("latin-1")
cfgdata = cfgdata + script_data + b"\n\0"
else:
# empty pre-install script