diff --git a/python/ycm/client/event_notification.py b/python/ycm/client/event_notification.py index 2121dbfa..5f79b4a5 100644 --- a/python/ycm/client/event_notification.py +++ b/python/ycm/client/event_notification.py @@ -51,14 +51,18 @@ class EventNotification( BaseRequest ): return [] try: - self._cached_response = [ _ConvertDiagnosticDataToVimData( x ) - for x in JsonFromFuture( - self._response_future ) ] - return self._cached_response + self._cached_response = JsonFromFuture( self._response_future ) except Exception as e: vimsupport.PostVimMessage( str( e ) ) return [] + if not self._cached_response: + return [] + + self._cached_response = [ _ConvertDiagnosticDataToVimData( x ) + for x in self._cached_response ] + return self._cached_response + def _ConvertDiagnosticDataToVimData( diagnostic ): # see :h getqflist for a description of the dictionary fields