fix bug in secret exchange

This commit is contained in:
2024-08-06 11:32:49 +02:00
parent 1278c4d3f4
commit da713dcd06

View File

@ -501,9 +501,9 @@ def share_secrets(app1_domain: str, app2_domain: str, secrets: Dict[str, str]) -
secrets (dict): A dictionary mapping secret names in app2 to their corresponding names in app1.
"""
app1_stored_secrets = abra("app", "secret", "ls", "-m", "-C", app1_domain, machine_output=True)
app1_stored_secrets = {x['name']: str2bool(x['created-on-server']) for x in app1_stored_secrets}
app1_stored_secrets = {x['name']: str2bool(x['created on server']) for x in app1_stored_secrets}
app2_stored_secrets = abra("app", "secret", "ls", "-m", "-C", app2_domain, machine_output=True)
app2_stored_secrets = {x['name']: str2bool(x['created-on-server']) for x in app2_stored_secrets}
app2_stored_secrets = {x['name']: str2bool(x['created on server']) for x in app2_stored_secrets}
try:
app1_container = abra("app" ,"ps", "-m", app1_domain, machine_output=True)
app1_container = list(app1_container)