(cfg, section, option)
return vals
parse comma separated values in debian control file style from .cfg
parse comma separated values in debian control file style from .cfg
parse comma separated values in debian control file style from . cfg
def parse_vals(cfg, section, option):
    """parse comma separated values in debian control file style from .cfg"""
    try:
        vals = cfg.get(section, option)
    except ConfigParser.NoSectionError as err:
        if section != 'DEFAULT':
            vals = cfg.get('DEFAULT', option)
        else:
            raise err
    vals = vals.split('#')[0]
    vals = vals.strip()
    vals = vals.split(',')
    vals = [v.strip() for v in vals]
    vals = [v for v in vals if len(v)]
    return vals
def parse_vals ( cfg , section , option ) : try : vals = cfg . get ( section , option ) except ConfigParser . NoSectionError as err : if section != 'DEFAULT' : vals = cfg . get ( 'DEFAULT' , option ) else : raise err vals = vals . split ( '#' ) [ 0 ] vals = vals . strip ( ) vals = vals . split ( ',' ) vals = [ v . strip ( ) for v in vals ] vals = [ v for v in vals if len ( v ) ] return vals