unicode->str.

This commit is contained in:
Martin v. Löwis 2008-03-22 01:20:40 +00:00
parent 4fbc72b4ac
commit a0272aa6e9
2 changed files with 3 additions and 3 deletions

View File

@ -25,11 +25,11 @@ class FixImport(basefix.BaseFix):
def transform(self, node, results):
imp = results['imp']
if unicode(imp).startswith('.'):
if str(imp).startswith('.'):
# Already a new-style import
return
if not probably_a_local_import(unicode(imp), self.filename):
if not probably_a_local_import(str(imp), self.filename):
# I guess this is a global import -- skip it!
return

View File

@ -31,7 +31,7 @@ class FixItertoolsImports(basefix.BaseFix):
else:
remove_comma ^= True
if unicode(children[-1]) == ',':
if str(children[-1]) == ',':
children[-1].remove()
# If there is nothing left, return a blank line