Instead of asserting non-unicodeness, let's just encode it.

This commit is contained in:
Jeremy Fincher 2004-02-13 04:43:39 +00:00
parent d3dcc62d1b
commit 681c091309

View File

@ -101,7 +101,8 @@ def canonicalName(command):
Currently, this makes everything lowercase and removes all dashes and
underscores.
"""
assert not isinstance(command, unicode)
if isinstance(command, unicode):
command = command.encode('utf-8')
special = '\t -_'
reAppend = ''
while command and command[-1] in special: