summaryrefslogtreecommitdiff
path: root/troveclient/shell.py
diff options
context:
space:
mode:
authorAmrith Kumar <amrith@tesora.com>2014-12-09 17:29:24 -0500
committerAmrith Kumar <amrith@tesora.com>2015-01-23 07:49:23 -0500
commitdca7bfe1e6727a347da9b4ad1f7bb7932a2eb134 (patch)
tree8e60d166ced2ef063867f41ae16268e1edf6e359 /troveclient/shell.py
parent96e44b5a9b7ca3caf6e3a43ec923d2bc49cca563 (diff)
downloadpython-troveclient-dca7bfe1e6727a347da9b4ad1f7bb7932a2eb134.tar.gz
Handle obsolete and unused oslo modules
The python-troveclient module still had references to strutils, and gettextutils which are now obsolete. Change-Id: Ia54a565c00966b0a1cb5f18c6e17e1237b2bfee6 Partial-Bug: #1380789
Diffstat (limited to 'troveclient/shell.py')
-rw-r--r--troveclient/shell.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/troveclient/shell.py b/troveclient/shell.py
index 05e5227..ecdf539 100644
--- a/troveclient/shell.py
+++ b/troveclient/shell.py
@@ -38,15 +38,17 @@ from keystoneclient.auth.identity.generic import token
from keystoneclient.auth.identity import v3 as identity
from keystoneclient import session as ks_session
+from oslo.utils import encodeutils
+from oslo.utils import importutils
+
import troveclient
import troveclient.auth_plugin
+
from troveclient import client
import troveclient.extension
+from troveclient.i18n import _ # noqa
from troveclient.openstack.common.apiclient import exceptions as exc
-from troveclient.openstack.common import gettextutils as gtu
-from troveclient.openstack.common.gettextutils import _ # noqa
-from troveclient.openstack.common import importutils
-from troveclient.openstack.common import strutils
+
from troveclient import utils
from troveclient.v1 import shell as shell_v1
@@ -620,7 +622,7 @@ class OpenStackHelpFormatter(argparse.HelpFormatter):
'trove create <name> <flavor_id> --databases <db_name>'
"""
if prefix is None:
- prefix = gtu._('usage: ')
+ prefix = _('usage: ')
# if usage is specified, use that
if usage is not None:
@@ -723,7 +725,7 @@ def main():
if sys.version_info >= (3, 0):
OpenStackTroveShell().main(sys.argv[1:])
else:
- OpenStackTroveShell().main(map(strutils.safe_decode,
+ OpenStackTroveShell().main(map(encodeutils.safe_decode,
sys.argv[1:]))
except KeyboardInterrupt:
print("... terminating trove client", file=sys.stderr)
@@ -733,7 +735,7 @@ def main():
message = six.text_type(e)
if not isinstance(message, six.string_types):
message = str(message)
- print("ERROR: %s" % strutils.safe_encode(message), file=sys.stderr)
+ print("ERROR: %s" % encodeutils.safe_encode(message), file=sys.stderr)
sys.exit(1)