From a75c92bb6a8b02d0b3a0507781bef4ee502d8f4a Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Wed, 3 Apr 2013 19:14:46 -0700 Subject: [PATCH] Using event.is_set to be compatible with Python2.6 Fixes #227 --- python/completers/python/jedi_completer.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python/completers/python/jedi_completer.py b/python/completers/python/jedi_completer.py index e1abda17..5796dc4e 100644 --- a/python/completers/python/jedi_completer.py +++ b/python/completers/python/jedi_completer.py @@ -105,7 +105,10 @@ class JediCompleter( Completer ): def WaitAndClear( event, timeout=None ): - flag_is_set = event.wait( timeout ) - if flag_is_set: - event.clear() - return flag_is_set + # We can't just do flag_is_set = event.wait( timeout ) because that breaks on + # Python 2.6 + event.wait( timeout ) + flag_is_set = event.is_set() + if flag_is_set: + event.clear() + return flag_is_set