With Python 3 this class has moved. Update the code to handle both cases.
Signed-off-by: Simon Glass <sjg@chromium.org>
import tempfile
import unittest
+try:
+ from StringIO import StringIO
+except ImportError:
+ from io import StringIO
+
import gitutil
import patchstream
import settings
+import tools
@contextlib.contextmanager
def capture():
import sys
- from cStringIO import StringIO
oldout,olderr = sys.stdout, sys.stderr
try:
out=[StringIO(), StringIO()]