Merge "py3.x: Fix usage of gettext.install"

This commit is contained in:
Zuul 2018-07-12 12:35:09 +00:00 committed by Gerrit Code Review
commit 87fd1c4b0e
5 changed files with 10 additions and 14 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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