aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/google/protobuf/text_format.py
diff options
context:
space:
mode:
authorGravatar Tres Seaver <tseaver@palladion.com>2015-01-13 15:04:41 -0500
committerGravatar Tres Seaver <tseaver@palladion.com>2015-01-13 15:04:41 -0500
commit47ee4d37c17db8e97fe5b15cf918ab56ff93bb18 (patch)
tree12aeab12f24937d637690fc95b288738a4b5d261 /python/google/protobuf/text_format.py
parentd25e6686d966cd641ed5852b630c02a60f26b7fd (diff)
Use 'io.BytesIO' rather than 'cStringIO.StringIO'.
Diffstat (limited to 'python/google/protobuf/text_format.py')
-rwxr-xr-xpython/google/protobuf/text_format.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/google/protobuf/text_format.py b/python/google/protobuf/text_format.py
index 87b5c222..c50930ef 100755
--- a/python/google/protobuf/text_format.py
+++ b/python/google/protobuf/text_format.py
@@ -34,7 +34,7 @@
__author__ = 'kenton@google.com (Kenton Varda)'
-import cStringIO
+import io
import re
import six
@@ -89,7 +89,7 @@ def MessageToString(message, as_utf8=False, as_one_line=False,
Returns:
A string of the text formatted protocol buffer message.
"""
- out = cStringIO.StringIO()
+ out = io.BytesIO()
PrintMessage(message, out, as_utf8=as_utf8, as_one_line=as_one_line,
pointy_brackets=pointy_brackets,
use_index_order=use_index_order,