diff --git a/integration/tests/integration/int_tests.py b/integration/tests/integration/int_tests.py index b139820a80..1e73a2244a 100644 --- a/integration/tests/integration/int_tests.py +++ b/integration/tests/integration/int_tests.py @@ -45,6 +45,7 @@ import logging import os import time import unittest +import six import sys import proboscis @@ -73,7 +74,10 @@ def add_support_for_localization(): if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): sys.path.insert(0, possible_topdir) - gettext.install('nova', unicode=1) + if six.PY2: + gettext.install('nova', unicode=1) + else: + gettext.install('nova') MAIN_RUNNER = None diff --git a/integration/tests/integration/tests/colorizer.py b/integration/tests/integration/tests/colorizer.py index 31cdb2019f..7defd0c27b 100644 --- a/integration/tests/integration/tests/colorizer.py +++ b/integration/tests/integration/tests/colorizer.py @@ -59,10 +59,14 @@ import heapq import logging import os import unittest +import six import sys import time -gettext.install('nova', unicode=1) +if six.PY2: + gettext.install('nova', unicode=1) +else: + gettext.install('nova') from nose import config from nose import core diff --git a/trove/cmd/common.py b/trove/cmd/common.py index 1e756e8176..1267ed9fe4 100644 --- a/trove/cmd/common.py +++ b/trove/cmd/common.py @@ -15,10 +15,6 @@ def initialize(extra_opts=None, pre_logging=None): - # Initialize localization support (the underscore character). - import gettext - gettext.install('trove', unicode=1) - # Import only the modules necessary to initialize logging and determine if # debug_utils are enabled. import sys diff --git a/trove/cmd/guest.py b/trove/cmd/guest.py index 687cebe27f..d4f90b8381 100644 --- a/trove/cmd/guest.py +++ b/trove/cmd/guest.py @@ -13,9 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import gettext -gettext.install('trove', unicode=1) - import sys from oslo_config import cfg as openstack_cfg diff --git a/trove/cmd/manage.py b/trove/cmd/manage.py index 76500d312c..dc44d0f511 100644 --- a/trove/cmd/manage.py +++ b/trove/cmd/manage.py @@ -13,14 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -import gettext import inspect import sys - -gettext.install('trove', unicode=1) - - from oslo_log import log as logging from trove.common import cfg