import logging
import re
-from osm_nbi.authconn import Authconn, AuthException, AuthconnConflictException # , AuthconnOperationException
+from osm_nbi.authconn import (
+ Authconn,
+ AuthException,
+ AuthconnConflictException,
+) # , AuthconnOperationException
from osm_common.dbbase import DbException
from osm_nbi.base_topic import BaseTopic
from osm_nbi.validation import is_valid_uuid
)
if old_pwd:
salt = user_data["_admin"]["salt"]
- shadow_password = sha256(old_pwd.encode('utf-8') + salt.encode('utf-8')).hexdigest()
+ shadow_password = sha256(
+ old_pwd.encode("utf-8") + salt.encode("utf-8")
+ ).hexdigest()
if shadow_password != user_data["password"]:
raise AuthconnConflictException(
- "Incorrect password",
- http_code=HTTPStatus.CONFLICT
+ "Incorrect password", http_code=HTTPStatus.CONFLICT
)
BaseTopic.format_on_edit(user_data, user_info)
# User Name