예제 #1
0
def build_cmd_parser(section):
    """
    Populate the parser to get a list of valid options
    """
    try:
        # Populate the parser to get a list of
        # valid options
        module = import_command(section)
        parser = module.build_parser(section)
    except (AttributeError, ImportError):
        # Use the default parser for section that don't
        # map to a command
        parser = GbpOptionParser(section)
        parser.parse_config_files()
    return parser
예제 #2
0
def parse_cmd_config(command):
    """Make a command parse it's config files"""
    parser = GbpOptionParser(command)
    parser.parse_config_files()
    return parser
예제 #3
0
def parse_cmd_config(command):
    """Make a command parse it's config files"""
    parser = GbpOptionParser(command)
    parser.parse_config_files()
    return parser