From b09870bb03ab043a6ace52733322b43ad53b05ab Mon Sep 17 00:00:00 2001 From: karxi Date: Tue, 29 Nov 2016 05:31:41 -0500 Subject: [PATCH] Another small parser fix. --- parsetools.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/parsetools.py b/parsetools.py index bdee428..a4981be 100644 --- a/parsetools.py +++ b/parsetools.py @@ -702,7 +702,12 @@ def kxhandleInput(ctx, text=None, flavor=None): return # Debug output. - print msg + try: + # Turns out that Windows consoles can't handle unicode, heh...who'da + # thunk. We have to repr() this, as such. + print repr(msg) + except Exception as err: + print "(Couldn't print processed message: {!s}").format(err) # karxi: We have a list...but I'm not sure if we ever get anything else, so # best to play it safe. I may remove this during later refactoring. if isinstance(msg, list):