From 3d733dca2d58ba1af6e33eb83b18f104e7dba2c8 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Thu, 22 May 2014 14:12:51 -0700 Subject: [PATCH] :YcmCompleter now won't print traceback If there's no semantic completer set for the current filetype, :YcmCompleter would print an ugly traceback. Ugh. Fixes #989. --- python/ycm/youcompleteme.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index 4ddb76b5..355c0d4c 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -196,8 +196,11 @@ class YouCompleteMe( object ): def GetDefinedSubcommands( self ): if self._IsServerAlive(): - return BaseRequest.PostDataToHandler( BuildRequestData(), - 'defined_subcommands' ) + try: + return BaseRequest.PostDataToHandler( BuildRequestData(), + 'defined_subcommands' ) + except ServerError: + return [] else: return []