(chan_file)
return chan_conf
Convert channel.conf file contents to dictionary
Convert channel.conf file contents to dictionary
Convert channel . conf file contents to dictionary
def _parse_chan_conf(chan_file):
    """Convert channel.conf file contents to dictionary"""
    chan_conf = {}
    with open(chan_file, 'r') as f:
        lines = f.read().splitlines()
        for line in lines[1:]:
            key, val = line.split('=')
            chan_conf[key.strip()] = val.strip()
    return chan_conf
def _parse_chan_conf ( chan_file ) : chan_conf = { } with open ( chan_file , 'r' ) as f : lines = f . read ( ) . splitlines ( ) for line in lines [ 1 : ] : key , val = line . split ( '=' ) chan_conf [ key . strip ( ) ] = val . strip ( ) return chan_conf