()
Parse the zarp config file
Parse the zarp config file
Parse the zarp config file
def parse_config():
    """ Parse the zarp config file
    """
    global CONFIG
    try:
        for line in open('config/zarp.conf', 'r').readlines():
            if line[0] == '#' or '=' not in line or len(line) < 1:
                continue

            vals = [k.strip().replace('\n', '') for k in line.split('=')]
            if len(vals) == 2:
                set(vals[0], vals[1])
    except Exception, e:
        util.Error(e)
def parse_config ( ) : global CONFIG try : for line in open ( 'config/zarp.conf' , 'r' ) . readlines ( ) : if line [ 0 ] == '#' or '=' not in line or len ( line ) < 1 : continue vals = [ k . strip ( ) . replace ( '\n' , '' ) for k in line . split ( '=' ) ] if len ( vals ) == 2 : set ( vals [ 0 ] , vals [ 1 ] ) except Exception , e : util . Error ( e )