Revert "Use oslo.utils"

This reverts commit 68c2fad55a.

Looks like this broke the stable branches. :(

Change-Id: I9d190e211ecfa80d573a6c48c0b485f3506fe947
Closes-Bug: #1357652
This commit is contained in:
Matt Riedemann
2014-08-17 16:13:09 +00:00
parent 8b2f6b5540
commit 181a466245
4 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -30,7 +30,6 @@ import logging
import os
import sys
from oslo.utils import encodeutils
import six
import keystoneclient
@@ -38,6 +37,7 @@ 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(encodeutils.safe_encode(six.text_type(e)), file=sys.stderr)
print(strutils.safe_encode(six.text_type(e)), file=sys.stderr)
sys.exit(1)

View File

@@ -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 = encodeutils.safe_encode(pt.get_string(sortby=order_by))
encoded = strutils.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 = encodeutils.safe_encode(pt.get_string(sortby='Property'))
encoded = strutils.safe_encode(pt.get_string(sortby='Property'))
if six.PY3:
encoded = encoded.decode()
print(encoded)

View File

@@ -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