aboutsummaryrefslogtreecommitdiffstats
path: root/functest/energy/energy.py
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2017-12-12 13:59:30 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-12-12 13:59:30 +0000
commit250a7936cc34e2e22c7a9a8f766c9ee0bdcb9f4c (patch)
treefc67c0232f04661a6cc037f44cc4c1b14720e8e4 /functest/energy/energy.py
parenta6a900f1032ef0c65996a71812b62811e46b840d (diff)
parent55733974628202786705227b7d6e9bb50558823d (diff)
Merge "Add python3 support in energy"
Diffstat (limited to 'functest/energy/energy.py')
-rw-r--r--functest/energy/energy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/functest/energy/energy.py b/functest/energy/energy.py
index 119942bb..2835e05c 100644
--- a/functest/energy/energy.py
+++ b/functest/energy/energy.py
@@ -12,10 +12,10 @@
import json
import logging
-import urllib
from functools import wraps
import requests
+from six.moves import urllib
from functest.utils.constants import CONST
import functest.utils.functest_utils as ft_utils
@@ -103,7 +103,7 @@ class EnergyRecorder(object):
assert environment
uri_comp = "/recorders/environment/"
- uri_comp += urllib.quote_plus(environment)
+ uri_comp += urllib.parse.quote_plus(environment)
# Creds
creds_usr = ft_utils.get_functest_config(
@@ -130,7 +130,7 @@ class EnergyRecorder(object):
except Exception as exc: # pylint: disable=broad-except
EnergyRecorder.logger.info(
"Energy recorder API is not available, cause=%s",
- exc.message)
+ str(exc))
api_available = False
# Final config
EnergyRecorder.energy_recorder_api = {