Skip to content

Commit

Permalink
Check if VAULT_ADDR env var exists before deleting it (#13016)
Browse files Browse the repository at this point in the history
Co-authored-by: dosas <[email protected]>
(cherry picked from commit c1d7b42)
  • Loading branch information
dosas authored and web-flow committed Nov 2, 2023
1 parent 18771e5 commit deb3c02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion robottelo/utils/vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def setup(self):
self.export_vault_addr()

def teardown(self):
del os.environ['VAULT_ADDR']
if os.environ.get('VAULT_ADDR') is not None:
del os.environ['VAULT_ADDR']

def export_vault_addr(self):
vaulturl = re.findall('VAULT_URL_FOR_DYNACONF=(.*)', self.envdata)[0]
Expand Down

0 comments on commit deb3c02

Please sign in to comment.