aboutsummaryrefslogtreecommitdiff
path: root/tests/docker/docker.py
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2018-06-20 15:45:42 +0100
committerAlex Bennée <alex.bennee@linaro.org>2018-06-20 16:57:34 +0100
commit7a5d936b6fc0cf262db86af0df7999ac904f8495 (patch)
tree36a1756cfecb3f081a33fbe3c7bb27751261b1ed /tests/docker/docker.py
parent46012db666990ff2eed1d3dc199ab8006439a93b (diff)
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 <alex.bennee@linaro.org>
Diffstat (limited to 'tests/docker/docker.py')
-rwxr-xr-xtests/docker/docker.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 306e14cf69..e4095270eb 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