def _sanity_check_generate_control(is_server, client_control_file, kernels, upload_kernel_config):
 if (is_server and client_control_file):
  raise model_logic.ValidationError({'tests': 'You cannot run server tests at the same time as directly supplying a client-side control file.'})
 if kernels:
  kernel_error = model_logic.ValidationError({'kernel': ('The kernel parameter must be a sequence of dictionaries containing at least the "version" key (got: %r)' % kernels)})
  try:
   iter(kernels)
  except TypeError:
   raise kernel_error
  for kernel_info in kernels:
   if ((not isinstance(kernel_info, dict)) or ('version' not in kernel_info)):
    raise kernel_error
  if (upload_kernel_config and (not is_server)):
   raise model_logic.ValidationError({'upload_kernel_config': 'Cannot use upload_kernel_config with client side tests'})

def _sanity_check_generate_control ( is_server , client_control_file , kernels , upload_kernel_config ) : if ( is_server and client_control_file ) : raise model_logic . ValidationError ( { 'tests' : 'You cannot run server tests at the same time as directly supplying a client-side control file.' } ) if kernels : kernel_error = model_logic . ValidationError ( { 'kernel' : ( 'The kernel parameter must be a sequence of dictionaries containing at least the "version" key (got: %r)' % kernels ) } ) try : iter ( kernels ) except TypeError : raise kernel_error for kernel_info in kernels : if ( ( not isinstance ( kernel_info , dict ) ) or ( 'version' not in kernel_info ) ) : raise kernel_error if ( upload_kernel_config and ( not is_server ) ) : raise model_logic . ValidationError ( { 'upload_kernel_config' : 'Cannot use upload_kernel_config with client side tests' } )
sanity check some of the parameters to generate_control() .