Fix for sahara CLI
Sahara CLI did not work because 'safe_encode' and 'safe_decode' methods have been moved from 'oslo.utils.strutils' module to 'oslo.utils.encodeutils' module Change-Id: Ica8cf4e8ec058fa0764e69945609f2a19effb840 Closes-bug: #1409432
This commit is contained in:
@@ -51,7 +51,8 @@ from keystoneclient.auth.identity.generic import password
|
||||
from keystoneclient.auth.identity.generic import token
|
||||
from keystoneclient.auth.identity import v3 as identity
|
||||
from keystoneclient import session
|
||||
from oslo.utils import strutils
|
||||
from oslo_utils import encodeutils
|
||||
from oslo_utils import strutils
|
||||
|
||||
from saharaclient.api import client
|
||||
from saharaclient.api import shell as shell_api
|
||||
@@ -702,11 +703,12 @@ class OpenStackHelpFormatter(argparse.HelpFormatter):
|
||||
|
||||
def main():
|
||||
try:
|
||||
OpenStackSaharaShell().main(map(strutils.safe_decode, sys.argv[1:]))
|
||||
OpenStackSaharaShell().main(map(encodeutils.safe_decode,
|
||||
sys.argv[1:]))
|
||||
|
||||
except Exception as e:
|
||||
logger.debug(e, exc_info=1)
|
||||
print("ERROR: %s" % strutils.safe_encode(six.text_type(e)),
|
||||
print("ERROR: %s" % encodeutils.safe_encode(six.text_type(e)),
|
||||
file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user