From d0ffb7dd996ddd43a1e0fe78fb28ee88cb167fd6 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sat, 24 Feb 2018 17:04:16 +0100 Subject: Set Energy default values to None MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It conforms with the other default values. Change-Id: Id46110c5aedf244f94e83b5b0389b135f075ffc8 Signed-off-by: Cédric Ollivier --- functest/energy/energy.py | 2 +- functest/utils/env.py | 4 ++-- 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 } -- cgit 1.2.3-korg