def _CheckStatus(status):
 if (status.code() != search_service_pb.SearchServiceError.OK):
  if (status.code() in _ERROR_MAP):
   raise _ERROR_MAP[status.code()](status.error_detail())
  else:
   raise InternalError(status.error_detail())

def _CheckStatus ( status ) : if ( status . code ( ) != search_service_pb . SearchServiceError . OK ) : if ( status . code ( ) in _ERROR_MAP ) : raise _ERROR_MAP [ status . code ( ) ] ( status . error_detail ( ) ) else : raise InternalError ( status . error_detail ( ) )
checks whether a requeststatus has a value of ok .