Fix exception when response future is not set
This commit is contained in:
parent
48b7ccef76
commit
bd890428a4
@ -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 ):
|
||||
|
@ -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 ):
|
||||
|
Loading…
Reference in New Issue
Block a user