From cf4325cef19d0943fc10713a6a5803095835d426 Mon Sep 17 00:00:00 2001 From: David Halter Date: Sun, 11 Aug 2013 21:05:19 +0430 Subject: [PATCH] fix an output proplem with debugging via stdout (encoding in python 2) --- jedi/debug.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jedi/debug.py b/jedi/debug.py index d9f30dc8..d4ab9106 100644 --- a/jedi/debug.py +++ b/jedi/debug.py @@ -1,4 +1,4 @@ -from _compatibility import u +from _compatibility import u, encoding, is_py3k import inspect import time @@ -59,6 +59,8 @@ def print_to_stdout(level, str_out): col = Fore.RED else: col = Fore.YELLOW + if not is_py3k: + str_out = str_out.encode(encoding, 'replace') print(col + str_out + Fore.RESET)