diff --git a/tox.ini b/tox.ini index b928f7ae..c7851002 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ setenv = {[testenv]setenv} commands = false [testenv:functional] -basepython = python2.7 +basepython = python3 setenv = {[testenv]setenv} {[testenv:common]setenv} OS_TEST_PATH=./vmware_nsxlib/tests/functional @@ -36,7 +36,7 @@ deps = -r{toxinidir}/vmware_nsxlib/tests/functional/requirements.txt [testenv:dsvm-functional] -basepython = python2.7 +basepython = python3 setenv = {[testenv]setenv} OS_SUDO_TESTING=1 OS_FAIL_ON_MISSING_DEPS=1 @@ -53,6 +53,7 @@ sitepackages = True commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:pep8] +basepython = python3 deps = {[testenv]deps} commands = @@ -69,6 +70,7 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/re commands = bandit -r vmware_nsxlib -n 5 -ll [testenv:cover] +basepython = python3 commands = python setup.py test --coverage --coverage-package-name=vmware_nsxlib --testr-args='{posargs}' coverage report @@ -77,6 +79,7 @@ commands = commands = {posargs} [testenv:docs] +basepython = python3 commands = sphinx-build -W -b html doc/source doc/build/html [flake8] diff --git a/vmware_nsxlib/v3/exceptions.py b/vmware_nsxlib/v3/exceptions.py index 31d7bf42..97c164bc 100644 --- a/vmware_nsxlib/v3/exceptions.py +++ b/vmware_nsxlib/v3/exceptions.py @@ -42,7 +42,7 @@ class NsxLibException(Exception): if six.PY2: def __unicode__(self): - return unicode(self.msg) + return unicode(self.msg) if six.PY2 else self.msg # noqa def __str__(self): return self.msg