14 |
14 |
15 g_credentials = None |
15 g_credentials = None |
16 g_portnumber = None |
16 g_portnumber = None |
17 g_throttle = [] |
17 g_throttle = [] |
18 |
18 |
19 valid_repos = ['Torr_Samaho/zandronum', 'Torr_Samaho/zandronum-stable', |
19 valid_repos = ['torr_samaho/zandronum', 'torr_samaho/zandronum-stable', |
20 'crimsondusk/zandronum-sandbox', 'crimsondusk/zandronum-sandbox-stable', 'crimsondusk/zfc9000'] |
20 'crimsondusk/zandronum-sandbox', 'crimsondusk/zandronum-sandbox-stable', 'crimsondusk/zfc9000', 'blzut3/doomseeker'] |
21 |
21 |
22 def is_throttled (address): |
22 def is_throttled (address): |
23 i = 0 |
23 i = 0 |
24 |
24 |
25 while i < len (g_throttle): |
25 while i < len (g_throttle): |
84 try: |
84 try: |
85 jsondata = json.loads (jsonstring) |
85 jsondata = json.loads (jsonstring) |
86 repodata = jsondata['repository'] |
86 repodata = jsondata['repository'] |
87 repo_fullname = '%s/%s' % (repodata['owner'], repodata['name']) |
87 repo_fullname = '%s/%s' % (repodata['owner'], repodata['name']) |
88 |
88 |
89 if repo_fullname not in valid_repos: |
89 if repo_fullname.lower() not in valid_repos: |
90 raise ValueError ('unknown repository %s' % repo_fullname) |
90 raise ValueError ('unknown repository %s' % repo_fullname) |
91 |
91 |
92 commit_data = [] |
92 commit_data = [] |
93 |
93 |
94 if 'commits' in jsondata: |
94 if 'commits' in jsondata: |