From e47608eeaf02f31773969e9fc4ae28943e38dfbb Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Sat, 27 Jan 2024 02:51:05 +0400 Subject: [PATCH] Update infisical_client.py --- crates/infisical-py/infisical_client/infisical_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/infisical-py/infisical_client/infisical_client.py b/crates/infisical-py/infisical_client/infisical_client.py index 4b855ef..55a056b 100644 --- a/crates/infisical-py/infisical_client/infisical_client.py +++ b/crates/infisical-py/infisical_client/infisical_client.py @@ -49,10 +49,11 @@ def listSecrets(self, options: ListSecretsOptions) -> List[SecretElement]: secrets = ResponseForListSecretsResponse.from_dict(result).data.secrets # Setting the env in Rust is not enough for Python apparently, so we have to do this as well. - for secret in secrets: - if(options.attach_to_process_env): + if options.attach_to_process_env: + for secret in secrets: os.environ[secret.secret_key] = secret.secret_value + return secrets def updateSecret(self, options: UpdateSecretOptions) -> SecretElement: result = self._run_command(Command(update_secret=options))