1 # vi: encoding=utf-8 ts=8 sts=4 sw=4 et
7 if 'HOME' in os.environ:
8 path = os.environ['HOME']
10 path = '../../' # cgi-bin interface
12 f = open(path + '/.ftpadmrc', 'r')
14 for line in f.readlines():
15 if line[0] == '#' or str.find(line, '=') == -1:
17 tuple = str.split(str.strip(line), '=')
18 if tuple[1][0] == '"':
19 value[str.strip(tuple[0])] = tuple[1][1:-1]
21 value[str.strip(tuple[0])] = str.strip(tuple[1])
25 default_to = value['ftp_dir'] + '/' + value['default_to'] + '/'
26 ftp_dir = value['ftp_dir'] + '/'
27 incoming_dir = value['ftp_dir'] + '/' + value['incoming_dir'] + '/'
28 test_builds_dir = value['ftp_dir'] + '/' + value['test_builds_dir'] + '/'
29 ftp_archs = value['ftp_archs'].split(' ')
31 builderqueue = value['builderqueue']
33 if 'sign_key' in value:
34 sign_key = value['sign_key']
38 if 'logs_list' in value:
39 logs_list = value['logs_list']
43 if 'signed_trees' in value:
44 signed_trees = value['signed_trees'].split(' ')
48 if 'archived_trees' in value:
49 archived_trees = value['archived_trees'].split(' ')
53 if 'old_poldek' in value and value['old_poldek'] == 'yes':
58 if value['separate_noarch'] == 'yes':
59 separate_noarch = True
61 separate_noarch = False
63 if value['separate_debuginfo'] == 'yes':
64 separate_debuginfo = True
66 separate_debuginfo = False
69 all_ftp_archs = ['noarch'] + ftp_archs
71 all_ftp_archs = ftp_archs
73 if 'ftp_dist' in value:
74 ftp_dist = value['ftp_dist']