replaced e.message
BaseException.message has been deprecated as of Python 2.6. http://legacy.python.org/dev/peps/pep-0352/ Replaced e.message with six.text_type(e) (uses unicode with Python 2.x and str with Python 3.x). Change-Id: I89aa278c337dd5985d6de28563b1d6e64ce4f95a
This commit is contained in:
@@ -21,6 +21,8 @@ import logging
|
|||||||
import logging.handlers
|
import logging.handlers
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import six
|
||||||
|
|
||||||
from tuskarclient import client
|
from tuskarclient import client
|
||||||
import tuskarclient.common.utils as utils
|
import tuskarclient.common.utils as utils
|
||||||
from tuskarclient.openstack.common.apiclient import exceptions as exc
|
from tuskarclient.openstack.common.apiclient import exceptions as exc
|
||||||
@@ -223,7 +225,7 @@ def main():
|
|||||||
try:
|
try:
|
||||||
TuskarShell(sys.argv[1:]).run()
|
TuskarShell(sys.argv[1:]).run()
|
||||||
except exc.CommandError as e:
|
except exc.CommandError as e:
|
||||||
print(e.message, file=sys.stderr)
|
print(six.text_type(e), file=sys.stderr)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception("Exiting due to an error:")
|
logger.exception("Exiting due to an error:")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user