aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/utils/env.py
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2021-05-11 14:09:25 +0000
committerGerrit Code Review <gerrit@opnfv.org>2021-05-11 14:09:25 +0000
commite0d3c56f24dd2673be6973d01ed90b05515572c6 (patch)
tree877663601025a01142f7571202681a060dd1dbd0 /xtesting/utils/env.py
parent1da464fc963f93b706576fa3fe3c79e650ed815c (diff)
parent92eb358358a3cb4a70daa8bbe6e53a1ff44c9d17 (diff)
Merge "Remove unnecessary condition in statement flow"
Diffstat (limited to 'xtesting/utils/env.py')
-rw-r--r--xtesting/utils/env.py5
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():