From 3fb9905166d040772f63efa4adca77e46ff90d1e Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 2 Jan 2019 19:09:47 +0100 Subject: [PATCH] Fix some bugs --- webserver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webserver.py b/webserver.py index a21ee22e..7bca1e3b 100644 --- a/webserver.py +++ b/webserver.py @@ -409,8 +409,11 @@ def hooks_github(): except Exception: abort(400) return + if j is None: + abort(400) + return # TODO: add secret check - message = f"🐙 {j['size']} aggiornamenti a Royalnet ricevuti:\n" + message = f"🐙 Nuovi aggiornamenti a Royalnet:\n" for commit in j.get("commits", []): message += f"{commit['message']} di {commit['author']}\n" telegram_bot.send_message(config["Telegram"]["main_group"],