aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-06 09:24:43 +0100
committerGravatar jesopo2018-10-06 09:24:43 +0100
commit908edeb1e168afe19e17ac0b04c72d0579283863 (patch)
treee6b707ca2d39944b4b400d53b512557a1ae5736f /modules
parentReturn 500 when an exception is thrown, never try to .encode None (diff)
signature
Typo in modules/github.py ('command' -> 'commit') and declare event_response
outside of try/except in modules/rest_api.py
Diffstat (limited to 'modules')
-rw-r--r--modules/github.py2
-rw-r--r--modules/rest_api.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/github.py b/modules/github.py
index 268c43ad..45c73619 100644
--- a/modules/github.py
+++ b/modules/github.py
@@ -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"])
diff --git a/modules/rest_api.py b/modules/rest_api.py
index d60a874b..bfee0d6f 100644
--- a/modules/rest_api.py
+++ b/modules/rest_api.py
@@ -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(