LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | List of all members
lsst.pipe.base.argumentParser.ConfigFileAction Class Reference

argparse action to load config overrides from one or more files More...

Inheritance diagram for lsst.pipe.base.argumentParser.ConfigFileAction:

Public Member Functions

def __call__
 Load one or more files of config overrides. More...
 

Detailed Description

argparse action to load config overrides from one or more files

Definition at line 637 of file argumentParser.py.

Member Function Documentation

def lsst.pipe.base.argumentParser.ConfigFileAction.__call__ (   self,
  parser,
  namespace,
  values,
  option_string = None 
)

Load one or more files of config overrides.

Parameters
[in]parserargument parser (instance of ArgumentParser)
[in,out]namespaceparsed command (an instance of argparse.Namespace); updated values:
  • namespace.config
[in]valuesa list of data config file paths
[in]option_stringoption value specified by the user (a str)

Definition at line 640 of file argumentParser.py.

641  def __call__(self, parser, namespace, values, option_string=None):
642  """!Load one or more files of config overrides
643 
644  @param[in] parser argument parser (instance of ArgumentParser)
645  @param[in,out] namespace parsed command (an instance of argparse.Namespace);
646  updated values:
647  - namespace.config
648  @param[in] values a list of data config file paths
649  @param[in] option_string option value specified by the user (a str)
650  """
651  if namespace.config is None:
652  return
653  for configfile in values:
654  try:
655  namespace.config.load(configfile)
656  except Exception, e:
657  parser.error("cannot load config file %r: %s" % (configfile, e))
658 
def __call__
Load one or more files of config overrides.

The documentation for this class was generated from the following file: