# vi: encoding=utf-8 ts=8 sts=4 sw=4 et import string, os value = {} if os.environ.has_key('HOME'): path = os.environ['HOME'] else: path = '../../' # cgi-bin interface f = open(path + '/.ftpadmrc', 'r') for line in f.readlines(): if line[0] == '#' or string.find(line, '=') == -1: continue tuple = string.split(string.strip(line), '=') if tuple[1][0] == '"': value[string.strip(tuple[0])] = tuple[1][1:-1] else: value[string.strip(tuple[0])] = string.strip(tuple[1]) f.close() default_to = value['ftp_dir'] + '/' + value['default_to'] + '/' ftp_dir = value['ftp_dir'] + '/' incoming_dir = value['ftp_dir'] + '/' + value['incoming_dir'] + '/' test_builds_dir = value['ftp_dir'] + '/' + value['test_builds_dir'] + '/' ftp_archs = value['ftp_archs'].split(' ') builderqueue = value['builderqueue'] if 'old_poldek' in value and value['old_poldek'] == 'yes': old_poldek = True else: old_poldek = False if 'poldek_indexes' in value: poldek_indexes = value['poldek_indexes'] else: poldek_indexes = 'old' if value['separate_noarch'] == 'yes': separate_noarch = True else: separate_noarch = False if value['separate_debuginfo'] == 'yes': separate_debuginfo = True else: separate_debuginfo = False if separate_noarch: all_ftp_archs = ['noarch'] + ftp_archs else: all_ftp_archs = ftp_archs