From: Alex Bennée Date: Wed, 20 Jun 2018 14:45:42 +0000 (+0100) Subject: docker: docker.py wrap StringIO import for python3 X-Git-Tag: v3.0.0-rc0~68^2~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a5d936b6fc0cf262db86af0df7999ac904f8495;p=thirdparty%2Fqemu.git docker: docker.py wrap StringIO import for python3 Although the docker.py is nominally python2 we actually invoke it with the configured python from the configure script. Signed-off-by: Alex Bennée --- diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 306e14cf694..e4095270eb1 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -26,7 +26,10 @@ import tempfile import re import signal from tarfile import TarFile, TarInfo -from StringIO import StringIO +try: + from StringIO import StringIO +except ImportError: + from io import StringIO from shutil import copy, rmtree from pwd import getpwuid