Commit 74aa5c74 authored by Guido van Rossum's avatar Guido van Rossum

Rip out all the u"..." literals and calls to unicode().

parent 3bf5ce40
...@@ -247,11 +247,11 @@ class bdist_wininst (Command): ...@@ -247,11 +247,11 @@ class bdist_wininst (Command):
# Convert cfgdata from unicode to ascii, mbcs encoded # Convert cfgdata from unicode to ascii, mbcs encoded
try: try:
unicode str
except NameError: except NameError:
pass pass
else: else:
if isinstance(cfgdata, unicode): if isinstance(cfgdata, str):
cfgdata = cfgdata.encode("mbcs") cfgdata = cfgdata.encode("mbcs")
# Append the pre-install script # Append the pre-install script
......
...@@ -147,7 +147,7 @@ class build_clib (Command): ...@@ -147,7 +147,7 @@ class build_clib (Command):
raise DistutilsSetupError, \ raise DistutilsSetupError, \
"each element of 'libraries' must a 2-tuple" "each element of 'libraries' must a 2-tuple"
if isinstance(lib[0], basestring) StringType: if isinstance(lib[0], basestring):
raise DistutilsSetupError, \ raise DistutilsSetupError, \
"first element of each tuple in 'libraries' " + \ "first element of each tuple in 'libraries' " + \
"must be a string (the library name)" "must be a string (the library name)"
......
...@@ -259,7 +259,7 @@ Your selection [default 1]: ''', end=' ') ...@@ -259,7 +259,7 @@ Your selection [default 1]: ''', end=' ')
if type(value) not in (type([]), type( () )): if type(value) not in (type([]), type( () )):
value = [value] value = [value]
for value in value: for value in value:
value = unicode(value).encode("utf-8") value = str(value).encode("utf-8")
body.write(sep_boundary) body.write(sep_boundary)
body.write('\nContent-Disposition: form-data; name="%s"'%key) body.write('\nContent-Disposition: form-data; name="%s"'%key)
body.write("\n\n") body.write("\n\n")
......
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