diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index 62755972..eda78ade 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -222,8 +222,13 @@ class YouCompleteMe( object ): except KeyError: pass - exists_completer = ( self.IsServerAlive() and - bool( SendCompleterAvailableRequest( filetype ) ) ) + if not self.IsServerAlive(): + return False + + exists_completer = SendCompleterAvailableRequest( filetype ) + if exists_completer is None: + return False + self._available_completers[ filetype ] = exists_completer return exists_completer