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