From 17a1a0ebfda94923292c2ff2b98593d24a23938a Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 28 Jan 2016 14:39:18 -0200 Subject: [PATCH] Colorama 0.3.6 is buggy, so just don't import it if it's not there. --- jedi/debug.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jedi/debug.py b/jedi/debug.py index 430a0329..4906b2ef 100644 --- a/jedi/debug.py +++ b/jedi/debug.py @@ -14,7 +14,12 @@ try: # pytest resets the stream at the end - causes troubles. Since after # every output the stream is reset automatically we don't need this. initialise.atexit_done = True - init() + try: + init() + except Exception: + # Colorama fails with initializing under vim and is buggy in + # version 0.3.6. + pass except ImportError: class Fore(object): RED = ''