config/sysinv/sysinv/sysinv/sysinv/cmd/__init__.py
Al Bailey 963157eb8f Deprecate sysinv.openstack.common.gettextutils
The gettextutils code dates back to when openstack projects
maintained common code and was later replaced by oslo_utils.

The new convention is to create a new _i18n.py file at the base
level and import it.

See: https://docs.openstack.org/oslo.i18n/latest

Most of the changes in this review are:

Old Code:
  from sysinv.openstack.common.gettextutils import _

New Code:
  from sysinv._i18n import _

This explicitly adds oslo_i18n to requirements.txt

Change-Id: I606ef9fef1e0431340669e9a2f153a038e72b88a
Story: 2006796
Task: 37340
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2019-11-04 10:04:20 -06:00

26 lines
842 B
Python

# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# TODO(deva): move eventlet imports to sysinv.__init__ once we move to PBR
import os
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
import eventlet
eventlet.monkey_patch(os=False)
import sysinv._i18n # noqa