diff options
author | Russell Bryant <russell@ovn.org> | 2015-12-15 16:01:38 -0500 |
---|---|---|
committer | Russell Bryant <russell@ovn.org> | 2016-02-02 16:41:21 -0500 |
commit | 981e9560cef1cc9d9f4de2e01298434bc13aa7ea (patch) | |
tree | 08395c231bff9c05c2e8b8a36a84e080bf7f4c61 /python | |
parent | 58de9fc30e45118a7a3b2018ced44adaefb6c3b9 (diff) | |
download | openvswitch-981e9560cef1cc9d9f4de2e01298434bc13aa7ea.tar.gz |
python: Don't use StringIO directly.
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>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/ovs/json.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/python/ovs/json.py b/python/ovs/json.py index c1dcd6339..fc8e80e2e 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() |