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:
@@ -15,12 +15,12 @@ import logging
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from oslo.utils import importutils
|
|
||||||
import requests
|
import requests
|
||||||
import six
|
import six
|
||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
|
|
||||||
from keystoneclient import exceptions
|
from keystoneclient import exceptions
|
||||||
|
from keystoneclient.openstack.common import importutils
|
||||||
from keystoneclient.openstack.common import jsonutils
|
from keystoneclient.openstack.common import jsonutils
|
||||||
from keystoneclient import utils
|
from keystoneclient import utils
|
||||||
|
|
||||||
|
@@ -30,7 +30,6 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oslo.utils import encodeutils
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
import keystoneclient
|
import keystoneclient
|
||||||
@@ -38,6 +37,7 @@ from keystoneclient import access
|
|||||||
from keystoneclient.contrib.bootstrap import shell as shell_bootstrap
|
from keystoneclient.contrib.bootstrap import shell as shell_bootstrap
|
||||||
from keystoneclient import exceptions as exc
|
from keystoneclient import exceptions as exc
|
||||||
from keystoneclient.generic import shell as shell_generic
|
from keystoneclient.generic import shell as shell_generic
|
||||||
|
from keystoneclient.openstack.common import strutils
|
||||||
from keystoneclient import session
|
from keystoneclient import session
|
||||||
from keystoneclient import utils
|
from keystoneclient import utils
|
||||||
from keystoneclient.v2_0 import shell as shell_v2_0
|
from keystoneclient.v2_0 import shell as shell_v2_0
|
||||||
@@ -461,7 +461,7 @@ def main():
|
|||||||
OpenStackIdentityShell().main(sys.argv[1:])
|
OpenStackIdentityShell().main(sys.argv[1:])
|
||||||
|
|
||||||
except Exception as e:
|
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)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -17,11 +17,11 @@ import inspect
|
|||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oslo.utils import encodeutils
|
|
||||||
import prettytable
|
import prettytable
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from keystoneclient import exceptions
|
from keystoneclient import exceptions
|
||||||
|
from keystoneclient.openstack.common import strutils
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -61,7 +61,7 @@ def print_list(objs, fields, formatters={}, order_by=None):
|
|||||||
|
|
||||||
if order_by is None:
|
if order_by is None:
|
||||||
order_by = fields[0]
|
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:
|
if six.PY3:
|
||||||
encoded = encoded.decode()
|
encoded = encoded.decode()
|
||||||
print(encoded)
|
print(encoded)
|
||||||
@@ -88,7 +88,7 @@ def print_dict(d, wrap=0):
|
|||||||
value = ''
|
value = ''
|
||||||
value = _word_wrap(value, max_length=wrap)
|
value = _word_wrap(value, max_length=wrap)
|
||||||
pt.add_row([prop, value])
|
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:
|
if six.PY3:
|
||||||
encoded = encoded.decode()
|
encoded = encoded.decode()
|
||||||
print(encoded)
|
print(encoded)
|
||||||
|
@@ -26,9 +26,9 @@ import argparse
|
|||||||
import getpass
|
import getpass
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oslo.utils import strutils
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from keystoneclient.openstack.common import strutils
|
||||||
from keystoneclient import utils
|
from keystoneclient import utils
|
||||||
from keystoneclient.v2_0 import client
|
from keystoneclient.v2_0 import client
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user