File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 24
24
import warnings
25
25
from platform import python_version
26
26
27
- import six
28
-
29
27
try :
30
28
import simplejson as json
31
29
except ImportError :
32
30
import json
33
31
34
32
from .. import __version__ , __versionstr__
33
+ from ..compat import PY2
35
34
from ..exceptions import (
36
35
HTTP_EXCEPTIONS ,
37
36
ElasticsearchWarning ,
@@ -358,7 +357,7 @@ def loggable_response_body(response):
358
357
# If 'response' isn't unicode we need to try converting it to
359
358
# unicode otherwise it's likely binary so should be encoded
360
359
# properly. On Python 3.x this works out fine.
361
- if six . PY2 and not isinstance (response , unicode ): # noqa
360
+ if PY2 and not isinstance (response , unicode ): # noqa
362
361
try :
363
362
response = response .decode ("utf-8" )
364
363
except (AttributeError , UnicodeError ):
You can’t perform that action at this time.
0 commit comments