Typo in modules/github.py ('command' -> 'commit') and declare event_response

outside of try/except in modules/rest_api.py
This commit is contained in:
jesopo 2018-10-06 09:24:43 +01:00
parent c3ace4be2e
commit 908edeb1e1
2 changed files with 2 additions and 1 deletions

View file

@ -14,7 +14,7 @@ class Module(ModuleManager.BaseModule):
full_name = data["repository"]["full_name"]
for commit in data["commits"]:
id = command["id"]
id = commit["id"]
message = commit["message"]
author = "%s <%s>" % (commit["author"]["username"],
commit["author"]["email"])

View file

@ -27,6 +27,7 @@ class Handler(http.server.BaseHTTPRequestHandler):
code = 401
else:
if path.startswith("/api/"):
event_response = None
try:
event_response = _events.on("api").on(method).on(
endpoint).call_unsafe_for_result(