Use get to avoid KeyErrors

pull/4/merge
David Baker 8 years ago
parent dad2da7e54
commit 7ed58bb347
  1. 2
      synapse/handlers/auth.py

@ -286,7 +286,7 @@ class AuthHandler(BaseHandler):
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)

Loading…
Cancel
Save