mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 13:31:27 +00:00
fix: re search
This commit is contained in:
parent
b9ee8fad91
commit
8495c632d5
|
@ -89,9 +89,8 @@ class KanidmAdminToken:
|
|||
stderr=subprocess.DEVNULL,
|
||||
)
|
||||
|
||||
new_kanidm_admin_password = re.search(r'{"password":"([^"]+)"}', output).group(
|
||||
1
|
||||
) # we have many not json strings in output
|
||||
new_kanidm_admin_password = re.findall(r'{"password":"([^"]+)"}', output)[-1]
|
||||
# we have many not json strings in output
|
||||
|
||||
redis.set("kanidm:password", new_kanidm_admin_password)
|
||||
return new_kanidm_admin_password
|
||||
|
|
Loading…
Reference in a new issue