Do not use the six library.
Change-Id: I3dbfcfa0f5f590a41ed549afd44537d8ed41433a
This commit is contained in:
committed by
Cyril Roelandt
parent
928935e5c0
commit
b513c8db4b
+1
-4
@@ -16,8 +16,6 @@
|
||||
import re
|
||||
import sys
|
||||
|
||||
import six
|
||||
|
||||
|
||||
class BaseException(Exception):
|
||||
"""An error occurred."""
|
||||
@@ -179,8 +177,7 @@ def from_response(response, body=None):
|
||||
details = ': '.join(details_temp)
|
||||
return cls(details=details)
|
||||
elif body:
|
||||
if six.PY3:
|
||||
body = body.decode('utf-8')
|
||||
body = body.decode('utf-8')
|
||||
details = body.replace('\n\n', '\n')
|
||||
return cls(details=details)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user