- more fixing

Sat, 29 Nov 2014 16:44:09 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sat, 29 Nov 2014 16:44:09 +0200
changeset 99
147d78eea80b
parent 98
4edbdf390bd1
child 100
2a56ccf67782

- 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))
 

mercurial