Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use get to avoid KeyErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Jul 22, 2016
1 parent dad2da7 commit 7ed58bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synapse/handlers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _check_recaptcha(self, authdict, clientip):
logger.info(
"%s reCAPTCHA from hostname %s",
"Successful" if resp_body['success'] else "Failed",
resp_body['hostname']
resp_body.get('hostname')
)
if resp_body['success']:
defer.returnValue(True)
Expand Down

0 comments on commit 7ed58bb

Please sign in to comment.