Sat, 29 Nov 2014 16:44:09 +0200
- more fixing
rest.py | file | annotate | diff | comparison | revisions |
--- a/rest.py Sat Nov 29 16:42:14 2014 +0200 +++ b/rest.py Sat Nov 29 16:44:09 2014 +0200 @@ -84,10 +84,10 @@ try: jsondata = json.loads (jsonstring) repodata = jsondata['repository'] - repo_name = '%s/%s' % (repodata['owner'], repodata['name']) + repo_fullname = '%s/%s' % (repodata['owner'], repodata['name']) - if repo_name not in valid_repos: - raise ValueError ('unknown repository %s' % repo_name) + if repo_fullname not in valid_repos: + raise ValueError ('unknown repository %s' % repo_fullname) commit_data = [] @@ -96,7 +96,7 @@ commit_data.append ([commit['node'], commit['message']]) if len (commit_data) > 0: - HgPoll.process_new_commits (repo_name, commit_data) + HgPoll.process_new_commits (repodata['name'], commit_data) except Exception as e: Irc.broadcast ('%s provided bad JSON: %s' % (address, e))