diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-02-25 16:03:34 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-03 19:12:39 +0100 |
commit | 21c422f730c75d5cf91421aeb2d960f188b2a32a (patch) | |
tree | 60c55071af1fae3b5ca7692c1ec7dfe0dda83905 /glanceclient/common/utils.py | |
parent | 46bf4527109f8d185d017bcbe16c23f502ab233b (diff) | |
download | python-glanceclient-21c422f730c75d5cf91421aeb2d960f188b2a32a.tar.gz |
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
Diffstat (limited to 'glanceclient/common/utils.py')
-rw-r--r-- | glanceclient/common/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |