def from_args(cls, args):
        """
        Initialize a WorkflowConfigParser instance using the command line values
        parsed in args. args must contain the values provided by the
        workflow_command_line_group() function. If you are not using the standard
        workflow command line interface, you should probably initialize directly
        using __init__()

        Parameters
        -----------
        args : argparse.ArgumentParser
            The command line arguments parsed by argparse
        """
        # Identify the config files
        confFiles = []

        # files and URLs to resolve
        if args.config_files:
            confFiles += args.config_files

        # Identify the deletes
        confDeletes = args.config_delete or []
        # and parse them
        parsedDeletes = []
        for delete in confDeletes:
            splitDelete = delete.split(":")
            if len(splitDelete) > 2:
                raise ValueError(
                    "Deletes must be of format section:option "
                    "or section. Cannot parse %s." % str(delete))
            else:
                parsedDeletes.append(tuple(splitDelete))

        # Identify the overrides
        confOverrides = args.config_overrides or []
        # and parse them
        parsedOverrides = []
        for override in confOverrides:
            splitOverride = override.split(":")
            if len(splitOverride) == 3:
                parsedOverrides.append(tuple(splitOverride))
            elif len(splitOverride) == 2:
                parsedOverrides.append(tuple(splitOverride + [""]))
            elif len(splitOverride) > 3:
                # Cannot have colons in either section name or variable name
                # but the value may contain colons
                rec_value = ':'.join(splitOverride[2:])
                parsedOverrides.append(tuple(splitOverride[:2] + [rec_value]))
            else:
                raise ValueError(
                    "Overrides must be of format section:option:value "
                    "or section:option. Cannot parse %s." % str(override))

        return cls(confFiles, parsedOverrides, None, parsedDeletes)
def from_args ( cls , args ) : confFiles = [ ] if args . config_files : confFiles += args . config_files confDeletes = args . config_delete or [ ] parsedDeletes = [ ] for delete in confDeletes : splitDelete = delete . split ( ":" ) if len ( splitDelete ) > 2 : raise ValueError ( "Deletes must be of format section:option " "or section. Cannot parse %s." % str ( delete ) ) else : parsedDeletes . append ( tuple ( splitDelete ) ) confOverrides = args . config_overrides or [ ] parsedOverrides = [ ] for override in confOverrides : splitOverride = override . split ( ":" ) if len ( splitOverride ) == 3 : parsedOverrides . append ( tuple ( splitOverride ) ) elif len ( splitOverride ) == 2 : parsedOverrides . append ( tuple ( splitOverride + [ "" ] ) ) elif len ( splitOverride ) > 3 : rec_value = ':' . join ( splitOverride [ 2 : ] ) parsedOverrides . append ( tuple ( splitOverride [ : 2 ] + [ rec_value ] ) ) else : raise ValueError ( "Overrides must be of format section:option:value " "or section:option. Cannot parse %s." % str ( override ) ) return cls ( confFiles , parsedOverrides , None , parsedDeletes )
Initialize a WorkflowConfigParser instance using the command line values
        parsed in args. args must contain the values provided by the
        workflow_command_line_group() function. If you are not using the standard
        workflow command line interface, you should probably initialize directly
        using __init__()

        Parameters
        -----------
        args : argparse.ArgumentParser
            The command line arguments parsed by argparse