Use oslo.utils

keystoneclient was using utility function from oslo-incubator
rather than oslo.utils.

Change-Id: I2909a2150b9556e54ef88e72358fda1cf8b7cc1c
This commit is contained in:
Brant Knudson 2014-08-05 17:57:46 -05:00
parent 64a21b56f5
commit 68c2fad55a
4 changed files with 7 additions and 7 deletions

@ -15,12 +15,12 @@ import logging
import os
from oslo.config import cfg
from oslo.utils import importutils
import requests
import six
from six.moves import urllib
from keystoneclient import exceptions
from keystoneclient.openstack.common import importutils
from keystoneclient.openstack.common import jsonutils
from keystoneclient import utils

@ -30,6 +30,7 @@ import logging
import os
import sys
from oslo.utils import encodeutils
import six
import keystoneclient
@ -37,7 +38,6 @@ from keystoneclient import access
from keystoneclient.contrib.bootstrap import shell as shell_bootstrap
from keystoneclient import exceptions as exc
from keystoneclient.generic import shell as shell_generic
from keystoneclient.openstack.common import strutils
from keystoneclient import session
from keystoneclient import utils
from keystoneclient.v2_0 import shell as shell_v2_0
@ -461,7 +461,7 @@ def main():
OpenStackIdentityShell().main(sys.argv[1:])
except Exception as e:
print(strutils.safe_encode(six.text_type(e)), file=sys.stderr)
print(encodeutils.safe_encode(six.text_type(e)), file=sys.stderr)
sys.exit(1)

@ -17,11 +17,11 @@ import inspect
import logging
import sys
from oslo.utils import encodeutils
import prettytable
import six
from keystoneclient import exceptions
from keystoneclient.openstack.common import strutils
logger = logging.getLogger(__name__)
@ -61,7 +61,7 @@ def print_list(objs, fields, formatters={}, order_by=None):
if order_by is None:
order_by = fields[0]
encoded = strutils.safe_encode(pt.get_string(sortby=order_by))
encoded = encodeutils.safe_encode(pt.get_string(sortby=order_by))
if six.PY3:
encoded = encoded.decode()
print(encoded)
@ -88,7 +88,7 @@ def print_dict(d, wrap=0):
value = ''
value = _word_wrap(value, max_length=wrap)
pt.add_row([prop, value])
encoded = strutils.safe_encode(pt.get_string(sortby='Property'))
encoded = encodeutils.safe_encode(pt.get_string(sortby='Property'))
if six.PY3:
encoded = encoded.decode()
print(encoded)

@ -26,9 +26,9 @@ import argparse
import getpass
import sys
from oslo.utils import strutils
import six
from keystoneclient.openstack.common import strutils
from keystoneclient import utils
from keystoneclient.v2_0 import client