From 21c422f730c75d5cf91421aeb2d960f188b2a32a Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Tue, 25 Feb 2014 16:03:34 +0100 Subject: Python 3: do not use the unicode() function It is Python2-specific, and should not be used in code intended to be portable. Change-Id: Ibebef1a7e51a7444538275d22d444c926b8b4dec Closes-Bug: 1284677 --- glanceclient/common/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glanceclient/common/utils.py') diff --git a/glanceclient/common/utils.py b/glanceclient/common/utils.py index fd284c1..04350d5 100644 --- a/glanceclient/common/utils.py +++ b/glanceclient/common/utils.py @@ -250,7 +250,7 @@ def getsockopt(self, *args, **kwargs): def exception_to_str(exc): try: - error = unicode(exc) + error = six.text_type(exc) except UnicodeError: try: error = str(exc) -- cgit v1.2.1