#NEWLINE# def _assert_request_state( self , current_request , expected_state ) : #NEWLINE# #INDENT# if ( current_request . state != expected_state ) : #NEWLINE# #INDENT# raise InvalidClientState ( ( 'Expected handle (%s) to be in state %r, got %r' % ( current_request . job . handle , current_request , current_request . state ) ) )