diff mbox

[ovs-dev,25/55] python: Don't use StringIO directly.

Message ID 1450730875-18083-26-git-send-email-russell@ovn.org
State Deferred
Headers show

Commit Message

Russell Bryant Dec. 21, 2015, 8:47 p.m. UTC
StringIO.StringIO in Python 2 became io.StringIO in Python 3.  Use
six.StringIO which is an alias for the two cases.

Signed-off-by: Russell Bryant <russell@ovn.org>
---
 python/ovs/json.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/python/ovs/json.py b/python/ovs/json.py
index c1dcd63..fc8e80e 100644
--- a/python/ovs/json.py
+++ b/python/ovs/json.py
@@ -13,7 +13,6 @@ 
 # limitations under the License.
 
 import re
-import StringIO
 import sys
 
 import six
@@ -122,7 +121,7 @@  def to_file(obj, name, pretty=False, sort_keys=True):
 
 
 def to_string(obj, pretty=False, sort_keys=True):
-    output = StringIO.StringIO()
+    output = six.StringIO()
     to_stream(obj, output, pretty, sort_keys)
     s = output.getvalue()
     output.close()