Merge "Python3: use six.StringIO rather than StringIO.StringIO"
This commit is contained in:
@@ -19,10 +19,10 @@ import hashlib
|
|||||||
import logging
|
import logging
|
||||||
import posixpath
|
import posixpath
|
||||||
import socket
|
import socket
|
||||||
import StringIO
|
|
||||||
import struct
|
import struct
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
|
import six
|
||||||
from six.moves import http_client
|
from six.moves import http_client
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -240,7 +240,7 @@ class HTTPClient(object):
|
|||||||
if resp.getheader('content-type', None) != 'application/octet-stream':
|
if resp.getheader('content-type', None) != 'application/octet-stream':
|
||||||
body_str = ''.join([chunk for chunk in body_iter])
|
body_str = ''.join([chunk for chunk in body_iter])
|
||||||
self.log_http_response(resp, body_str)
|
self.log_http_response(resp, body_str)
|
||||||
body_iter = StringIO.StringIO(body_str)
|
body_iter = six.StringIO(body_str)
|
||||||
else:
|
else:
|
||||||
self.log_http_response(resp)
|
self.log_http_response(resp)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user