From 9d4485217aa79ee0903852471c3ffb0b3d5a8b94 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Wed, 14 May 2014 19:17:32 +0200 Subject: [PATCH] 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: I590749a1d05f39350996ec5ce5838b9c90baeb92 --- troveclient/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/troveclient/shell.py b/troveclient/shell.py index e5d9490c..addce2c9 100644 --- a/troveclient/shell.py +++ b/troveclient/shell.py @@ -627,7 +627,7 @@ def main(): sys.exit(130) except Exception as e: logger.debug(e, exc_info=1) - message = e.message + message = six.text_type(e) if not isinstance(message, six.string_types): message = str(message) print("ERROR: %s" % strutils.safe_encode(message), file=sys.stderr)