Skip to content

Commit

Permalink
#278 fix bug made in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenGreuell committed Jan 24, 2025
1 parent 4e1e0ec commit 526d1fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jupyterlab_vre/services/secrets_manager/secrets_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def set_secret(self, secret_name: str):
current_secret_value: str = os.environ.get(self.environment_secret_prefix + secret_name)
if (current_secret_value):
print(f"\nThere is already a secret named {secret_name} stored as {self.environment_secret_prefix + secret_name}. Entering a new value will overwrite the existing secret.")
new_secret_value = self.request_secret_value()
self.store_secret(secret_name, new_secret_value)
new_secret_value = self._request_secret_value()
self._store_secret(secret_name, new_secret_value)

def get_secret(self, secret_name: str) -> str:
'''Retrieves secret from environment variables
Expand All @@ -24,8 +24,8 @@ def get_secret(self, secret_name: str) -> str:
secret_value = os.environ.get(self.environment_secret_prefix + secret_name)
if not secret_value:
print(f"\nA secret with name {self.environment_secret_prefix + secret_name} is not yet stored in environment variables.")
secret_value = self.request_secret_value()
self.store_secret(secret_name, secret_value)
secret_value = self._request_secret_value()
self._store_secret(secret_name, secret_value)
return secret_value

def remove_secret(self, secret_name: str) -> None:
Expand Down

0 comments on commit 526d1fd

Please sign in to comment.