diff --git a/python/ycm/client/completion_request.py b/python/ycm/client/completion_request.py index 4bf284c6..1325711d 100644 --- a/python/ycm/client/completion_request.py +++ b/python/ycm/client/completion_request.py @@ -35,6 +35,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 ): @@ -44,7 +45,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 fa5df75e..e797ddb6 100644 --- a/python/ycm/client/event_notification.py +++ b/python/ycm/client/event_notification.py @@ -33,6 +33,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 @@ -47,7 +48,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 ):