From 681c0913092cdbef95a82896ffef33b832d7f6a9 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 13 Feb 2004 04:43:39 +0000 Subject: [PATCH] Instead of asserting non-unicodeness, let's just encode it. --- src/callbacks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/callbacks.py b/src/callbacks.py index 6743b1896..9d1038bbb 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -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: