mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Instead of asserting non-unicodeness, let's just encode it.
This commit is contained in:
parent
d3dcc62d1b
commit
681c091309
@ -101,7 +101,8 @@ def canonicalName(command):
|
|||||||
Currently, this makes everything lowercase and removes all dashes and
|
Currently, this makes everything lowercase and removes all dashes and
|
||||||
underscores.
|
underscores.
|
||||||
"""
|
"""
|
||||||
assert not isinstance(command, unicode)
|
if isinstance(command, unicode):
|
||||||
|
command = command.encode('utf-8')
|
||||||
special = '\t -_'
|
special = '\t -_'
|
||||||
reAppend = ''
|
reAppend = ''
|
||||||
while command and command[-1] in special:
|
while command and command[-1] in special:
|
||||||
|
Loading…
Reference in New Issue
Block a user