diff options
author | David Baker <dave@matrix.org> | 2016-07-22 17:18:50 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-07-22 17:18:50 +0100 |
commit | 7ed58bb3476c4a18a9af97b8ee3358dac00098eb (patch) | |
tree | 8d0e59314f31d23c646de78a82b7865bfa8929fd | |
parent | Log the hostname the reCAPTCHA was completed on (diff) | |
download | synapse-7ed58bb3476c4a18a9af97b8ee3358dac00098eb.tar.xz |
Use get to avoid KeyErrors
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/auth.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 6fff7e7d03..d5d2072436 100644 --- a/synapse/handlers/auth.py +++ b/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) |