diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-08-02 00:54:06 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-02 00:54:06 +1000 |
commit | da7785147df442eb9cdc1031fa5fea12b7b25334 (patch) | |
tree | 4a10c31ba0cda805cd31047cdbb4aa9ccb32a8ce /synapse/rest/client/v2_alpha | |
parent | Merge pull request #3543 from bebehei/docker (diff) | |
download | synapse-da7785147df442eb9cdc1031fa5fea12b7b25334.tar.xz |
Python 3: Convert some unicode/bytes uses (#3569)
Diffstat (limited to 'synapse/rest/client/v2_alpha')
-rw-r--r-- | synapse/rest/client/v2_alpha/register.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py index d6cf915d86..2f64155d13 100644 --- a/synapse/rest/client/v2_alpha/register.py +++ b/synapse/rest/client/v2_alpha/register.py @@ -193,15 +193,15 @@ class RegisterRestServlet(RestServlet): def on_POST(self, request): body = parse_json_object_from_request(request) - kind = "user" - if "kind" in request.args: - kind = request.args["kind"][0] + kind = b"user" + if b"kind" in request.args: + kind = request.args[b"kind"][0] - if kind == "guest": + if kind == b"guest": ret = yield self._do_guest_registration(body) defer.returnValue(ret) return - elif kind != "user": + elif kind != b"user": raise UnrecognizedRequestError( "Do not understand membership kind: %s" % (kind,) ) @@ -389,8 +389,8 @@ class RegisterRestServlet(RestServlet): assert_params_in_dict(params, ["password"]) desired_username = params.get("username", None) - new_password = params.get("password", None) guest_access_token = params.get("guest_access_token", None) + new_password = params.get("password", None) if desired_username is not None: desired_username = desired_username.lower() |