def check_opt_value(conf, names):
 for name in names:
  try:
   getattr(conf, name)
  except (cfg.NoSuchOptError, cfg.ConfigFileValueError):
   with excutils.save_and_reraise_exception():
    output_log(MSG.INVALID_PARAMETER, param=name)

def check_opt_value ( conf , names ) : for name in names : try : getattr ( conf , name ) except ( cfg . NoSuchOptError , cfg . ConfigFileValueError ) : with excutils . save_and_reraise_exception ( ) : output_log ( MSG . INVALID_PARAMETER , param = name )
check if the parameter names and values are valid .