From: Jay S. Bryant Date: Mon, 21 Jul 2014 01:14:27 +0000 (-0500) Subject: Add additional explicit imports of _ where needed X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=42cc9906cc69f00f749f7e4dff0c848f7c9e31ed;p=openstack-build%2Fcinder-build.git Add additional explicit imports of _ where needed It appears that I missed some of the needed explicit imports of _. I have now run through all the /bin/cinder-* functions and ensured that they can be properly started. This patch adds additional imports of _ and also changes cinder-rtstool to use the 'cinder' domain as was suggested by Duncan Thomas in the first review cycle. Change-Id: I6477093cb817b5b9506dd3787f027e073c51f37d Closes-Bug: 1345789 --- diff --git a/bin/cinder-all b/bin/cinder-all index 566273c26..7243712bb 100755 --- a/bin/cinder-all +++ b/bin/cinder-all @@ -49,6 +49,7 @@ gettextutils.enable_lazy() # Need to register global_opts from cinder.common import config # noqa +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging from cinder import service from cinder import utils diff --git a/bin/cinder-manage b/bin/cinder-manage index a04483226..1e9762ce8 100755 --- a/bin/cinder-manage +++ b/bin/cinder-manage @@ -80,6 +80,7 @@ from cinder.common import config # noqa from cinder import context from cinder import db from cinder.db import migration +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging from cinder.openstack.common import uuidutils from cinder import rpc diff --git a/bin/cinder-rtstool b/bin/cinder-rtstool index 7801268e7..a4300fc5c 100755 --- a/bin/cinder-rtstool +++ b/bin/cinder-rtstool @@ -16,13 +16,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -import gettext import sys import rtslib -gettext.install('cinder-rtstool', unicode=1) -gettext.enable_lazy() +from cinder.openstack.common import gettextutils +from cinder.openstack.common.gettextutils import _ + +gettextutils.install('cinder') +gettextutils.enable_lazy() class RtstoolError(Exception): diff --git a/bin/cinder-volume-usage-audit b/bin/cinder-volume-usage-audit index 13cb1c231..2b143dc87 100755 --- a/bin/cinder-volume-usage-audit +++ b/bin/cinder-volume-usage-audit @@ -57,6 +57,7 @@ gettextutils.enable_lazy() from cinder import context from cinder import db +from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging from cinder import rpc from cinder import utils