mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 02:49:22 -05:00
Fix style violations
Signed-off-by: Kent Shikama <kent@kentshikama.com>
This commit is contained in:
parent
2e5a31f197
commit
bb069079bb
@ -358,7 +358,8 @@ class RegistrationHandler(BaseHandler):
|
|||||||
defer.returnValue(data)
|
defer.returnValue(data)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def get_or_create_user(self, localpart, displayname, duration_seconds, password_hash=None):
|
def get_or_create_user(self, localpart, displayname, duration_seconds,
|
||||||
|
password_hash=None):
|
||||||
"""Creates a new user if the user does not exist,
|
"""Creates a new user if the user does not exist,
|
||||||
else revokes all previous access tokens and generates a new one.
|
else revokes all previous access tokens and generates a new one.
|
||||||
|
|
||||||
|
@ -410,7 +410,8 @@ class CreateUserRestServlet(ClientV1RestServlet):
|
|||||||
raise SynapseError(400, "Failed to parse 'duration_seconds'")
|
raise SynapseError(400, "Failed to parse 'duration_seconds'")
|
||||||
if duration_seconds > self.direct_user_creation_max_duration:
|
if duration_seconds > self.direct_user_creation_max_duration:
|
||||||
duration_seconds = self.direct_user_creation_max_duration
|
duration_seconds = self.direct_user_creation_max_duration
|
||||||
password_hash = user_json["password_hash"].encode("utf-8") if user_json.get("password_hash") else None
|
password_hash = user_json["password_hash"].encode("utf-8") \
|
||||||
|
if user_json.get("password_hash") else None
|
||||||
|
|
||||||
handler = self.handlers.registration_handler
|
handler = self.handlers.registration_handler
|
||||||
user_id, token = yield handler.get_or_create_user(
|
user_id, token = yield handler.get_or_create_user(
|
||||||
|
Loading…
Reference in New Issue
Block a user