Merge "py3.x: Fix usage of gettext.install"
This commit is contained in:
commit
87fd1c4b0e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user