Python 3 Fix: use bytesIO instead of cStringIO

With the move from cStringIO to the io module, use six..BytesIO as
a python 3 compatible version of cStringIO module.

Change-Id: Idc62004b28f79c5ef2e3aa0250fce30882f4be65
This commit is contained in:
Morgan Fainberg
2016-05-30 14:05:46 -07:00
parent 1b9bd78a71
commit 822e807154
+2 -2
View File
@@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import six
from six.moves import configparser as ConfigParser
import cStringIO
import extras
import logging
import logging.config
@@ -47,7 +47,7 @@ def stack_dump_handler(signum, frame):
yappi.start()
else:
yappi.stop()
yappi_out = cStringIO.StringIO()
yappi_out = six.BytesIO()
yappi.get_func_stats().print_all(out=yappi_out)
yappi.get_thread_stats().print_all(out=yappi_out)
log.debug(yappi_out.getvalue())