#NEWLINE# def _check_complete_value( self , is_complete ) : #NEWLINE# #INDENT# if ( is_complete not in ( True , False ) ) : #NEWLINE# #INDENT# if isinstance ( is_complete , TracebackWrapper ) : #NEWLINE# #INDENT# raise AsyncCompletionException ( is_complete . trace ) #NEWLINE# #UNINDENT# raise Exception ( ( 'Return value of Task.complete() must be boolean (was %r)' % is_complete ) )