diff options
author | Cedric Ollivier <cedric.ollivier@orange.com> | 2021-05-11 14:09:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2021-05-11 14:09:25 +0000 |
commit | e0d3c56f24dd2673be6973d01ed90b05515572c6 (patch) | |
tree | 877663601025a01142f7571202681a060dd1dbd0 /xtesting/utils/env.py | |
parent | 1da464fc963f93b706576fa3fe3c79e650ed815c (diff) | |
parent | 92eb358358a3cb4a70daa8bbe6e53a1ff44c9d17 (diff) |
Merge "Remove unnecessary condition in statement flow"
Diffstat (limited to 'xtesting/utils/env.py')
-rw-r--r-- | xtesting/utils/env.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xtesting/utils/env.py b/xtesting/utils/env.py index 042ab675..83484914 100644 --- a/xtesting/utils/env.py +++ b/xtesting/utils/env.py @@ -30,9 +30,8 @@ INPUTS = { def get(env_var): - if env_var not in INPUTS.keys(): - return os.environ.get(env_var, None) - return os.environ.get(env_var, INPUTS[env_var]) + # defaults to None if env_var is not found + return os.environ.get(env_var, INPUTS.get(env_var)) def string(): |