Small bugfix to cmdhandler to avoid a unicode-related traceback.

.
Griatch
This commit is contained in:
Griatch 2009-11-25 22:02:22 +00:00
parent 4d9081d710
commit 1e2fba9680

View file

@ -137,7 +137,9 @@ class Command(object):
"""
# If we get a unicode string with un-recognizable characters, replace
# them instead of throwing errors.
self.raw_input = unicode(raw_input, errors='replace')
self.raw_input = raw_input
if not isinstance(raw_input, unicode):
self.raw_input = unicode(raw_input, errors='replace')
self.source_object = source_object
self.session = session
# The work starts here.