From 65d43f3ca5965acc45b605e7867d877c0166ee96 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 8 Mar 2017 11:48:43 +0000 Subject: [PATCH] Minor fixes from PR feedback --- synapse/rest/client/v1/login.py | 2 +- synapse/rest/client/v2_alpha/register.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py index 77a0f00c5..a705fc838 100644 --- a/synapse/rest/client/v1/login.py +++ b/synapse/rest/client/v1/login.py @@ -66,7 +66,7 @@ def login_id_thirdparty_from_phone(identifier): """ Convert a phone login identifier type to a generic threepid identifier Args: - identifier: Login identifier dict of type 'm.id.phone' + identifier(dict): Login identifier dict of type 'm.id.phone' Returns: Login identifier dict of type 'm.id.threepid' """ diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py index 4e872e1a8..98b277e07 100644 --- a/synapse/rest/client/v2_alpha/register.py +++ b/synapse/rest/client/v2_alpha/register.py @@ -371,7 +371,7 @@ class RegisterRestServlet(RestServlet): reqd = ('medium', 'address', 'validated_at') if any(x not in threepid for x in reqd): logger.info("Can't add incomplete 3pid") - defer.returnValue() + return yield self.auth_handler.add_threepid( user_id, @@ -447,9 +447,7 @@ class RegisterRestServlet(RestServlet): if bind_msisdn: logger.info("bind_msisdn specified: binding") - logger.debug("Binding msisdn %s to %s" % ( - threepid, user_id - )) + logger.debug("Binding msisdn %s to %s", threepid, user_id) yield self.identity_handler.bind_threepid( threepid['threepid_creds'], user_id )