Fixup synapse.rest to pass mypy (#6732)

This commit is contained in:
Erik Johnston 2020-01-20 17:38:21 +00:00 committed by GitHub
parent 74b74462f1
commit b0a66ab83c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 56 additions and 35 deletions

View file

@ -21,6 +21,7 @@ from typing import List, Union
from six import string_types
import synapse
import synapse.api.auth
import synapse.types
from synapse.api.constants import LoginType
from synapse.api.errors import (
@ -405,7 +406,7 @@ class RegisterRestServlet(RestServlet):
return ret
elif kind != b"user":
raise UnrecognizedRequestError(
"Do not understand membership kind: %s" % (kind,)
"Do not understand membership kind: %s" % (kind.decode("utf8"),)
)
# we do basic sanity checks here because the auth layer will store these