aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-24 17:04:16 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-24 17:04:16 +0100
commitd0ffb7dd996ddd43a1e0fe78fb28ee88cb167fd6 (patch)
tree373501d878fe82760dee64bcfbf2a46b73b090be
parentee838977750a9d23d02a710f7a41a02e8f0f24a4 (diff)
Set Energy default values to None
It conforms with the other default values. Change-Id: Id46110c5aedf244f94e83b5b0389b135f075ffc8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-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
}