Skip to content

Commit

Permalink
Merge pull request #51 from Dav1dde/jenkins2
Browse files Browse the repository at this point in the history
wrap json.loads in try..except
  • Loading branch information
TkTech committed Jan 29, 2014
2 parents ab4a5b3 + 22cddf7 commit c649ae4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion notifico/services/hooks/jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def service_description(cls):

@classmethod
def handle_request(cls, user, request, hook):
payload = json.loads(request.data)
try:
payload = json.loads(request.data)
except ValueError:
return
if not payload:
return

Expand Down

0 comments on commit c649ae4

Please sign in to comment.