# HG changeset patch # User Teemu Piippo # Date 1417272249 -7200 # Node ID 147d78eea80b508ea87a9bf570df0095056d0ea8 # Parent 4edbdf390bd14289f2459a90d2303273f24890ec - more fixing diff -r 4edbdf390bd1 -r 147d78eea80b rest.py --- 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))