diff --git a/python/ycm/client/completion_request.py b/python/ycm/client/completion_request.py index f4440b64..412e27c4 100644 --- a/python/ycm/client/completion_request.py +++ b/python/ycm/client/completion_request.py @@ -38,6 +38,7 @@ class CompletionRequest( BaseRequest ): def __init__( self, request_data ): super( CompletionRequest, self ).__init__() self.request_data = request_data + self._response_future = None def Start( self ): @@ -47,7 +48,7 @@ class CompletionRequest( BaseRequest ): def Done( self ): - return self._response_future.done() + return bool( self._response_future ) and self._response_future.done() def RawResponse( self ): diff --git a/python/ycm/client/event_notification.py b/python/ycm/client/event_notification.py index bd73f31f..cf87bf9f 100644 --- a/python/ycm/client/event_notification.py +++ b/python/ycm/client/event_notification.py @@ -37,6 +37,7 @@ class EventNotification( BaseRequest ): self._event_name = event_name self._filepath = filepath self._extra_data = extra_data + self._response_future = None self._cached_response = None @@ -51,7 +52,7 @@ class EventNotification( BaseRequest ): def Done( self ): - return self._response_future.done() + return bool( self._response_future ) and self._response_future.done() def Response( self ):