Python3: use six.StringIO rather than StringIO.StringIO
It’s an alias for StringIO.StringIO in Python 2 and io.StringIO in Python 3. Change-Id: I1c2f1412c586d5d8e0aa866a28232747056e0ca7
This commit is contained in:
parent
c473f19fc9
commit
440d155558
|
@ -19,10 +19,10 @@ import hashlib
|
|||
import logging
|
||||
import posixpath
|
||||
import socket
|
||||
import StringIO
|
||||
import struct
|
||||
import urlparse
|
||||
|
||||
import six
|
||||
from six.moves import http_client
|
||||
|
||||
try:
|
||||
|
@ -240,7 +240,7 @@ class HTTPClient(object):
|
|||
if resp.getheader('content-type', None) != 'application/octet-stream':
|
||||
body_str = ''.join([chunk for chunk in body_iter])
|
||||
self.log_http_response(resp, body_str)
|
||||
body_iter = StringIO.StringIO(body_str)
|
||||
body_iter = six.StringIO(body_str)
|
||||
else:
|
||||
self.log_http_response(resp)
|
||||
|
||||
|
|
Loading…
Reference in New Issue