Skip to content

Commit

Permalink
Reordered attribute collection for get_attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
dwest77a committed Feb 6, 2024
1 parent a33a361 commit d13ee85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pipeline/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def get_attribute(env: str, args, var: str):
Finds value of variable from Environment or ParseArgs object, or reports failure
"""
if os.getenv(env):
return os.getenv(env)
elif hasattr(args, var):
if hasattr(args, var):
return getattr(args, var)
elif os.getenv(env):
return os.getenv(env)
else:
raise MissingVariableError(type=f'${var}')

0 comments on commit d13ee85

Please sign in to comment.