summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-07-22 17:18:50 +0100
committerDavid Baker <dave@matrix.org>2016-07-22 17:18:50 +0100
commit7ed58bb3476c4a18a9af97b8ee3358dac00098eb (patch)
tree8d0e59314f31d23c646de78a82b7865bfa8929fd
parentLog the hostname the reCAPTCHA was completed on (diff)
downloadsynapse-7ed58bb3476c4a18a9af97b8ee3358dac00098eb.tar.xz
Use get to avoid KeyErrors
Diffstat (limited to '')
-rw-r--r--synapse/handlers/auth.py2
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)