mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 22:00:22 +00:00
Use get to avoid KeyErrors
This commit is contained in:
parent
dad2da7e54
commit
7ed58bb347
1 changed files with 1 additions and 1 deletions
|
@ -286,7 +286,7 @@ class AuthHandler(BaseHandler):
|
||||||
logger.info(
|
logger.info(
|
||||||
"%s reCAPTCHA from hostname %s",
|
"%s reCAPTCHA from hostname %s",
|
||||||
"Successful" if resp_body['success'] else "Failed",
|
"Successful" if resp_body['success'] else "Failed",
|
||||||
resp_body['hostname']
|
resp_body.get('hostname')
|
||||||
)
|
)
|
||||||
if resp_body['success']:
|
if resp_body['success']:
|
||||||
defer.returnValue(True)
|
defer.returnValue(True)
|
||||||
|
|
Loading…
Reference in a new issue