aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functest/energy/energy.py2
-rw-r--r--functest/utils/env.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/functest/energy/energy.py b/functest/energy/energy.py
index d5f6871d0..a26522119 100644
--- a/functest/energy/energy.py
+++ b/functest/energy/energy.py
@@ -107,7 +107,7 @@ class EnergyRecorder(object):
uri_comp = "/recorders/environment/"
uri_comp += urllib.parse.quote_plus(environment)
- if creds_usr != "" and creds_pass != "":
+ if creds_usr and creds_pass:
energy_recorder_api_auth = (creds_usr, creds_pass)
else:
energy_recorder_api_auth = None
diff --git a/functest/utils/env.py b/functest/utils/env.py
index 5ad870ed8..aa2da0b54 100644
--- a/functest/utils/env.py
+++ b/functest/utils/env.py
@@ -24,8 +24,8 @@ INPUTS = {
'POD_ARCH': None,
'TEST_DB_URL': 'http://testresults.opnfv.org/test/api/v1/results',
'ENERGY_RECORDER_API_URL': 'http://energy.opnfv.fr/resources',
- 'ENERGY_RECORDER_API_USER': '',
- 'ENERGY_RECORDER_API_PASSWORD': ''
+ 'ENERGY_RECORDER_API_USER': None,
+ 'ENERGY_RECORDER_API_PASSWORD': None
}