From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVvII-0002ru-7B for qemu-devel@nongnu.org; Thu, 21 Jun 2018 04:50:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVvIH-0004vU-DV for qemu-devel@nongnu.org; Thu, 21 Jun 2018 04:50:18 -0400 Received: from mail-ot0-x241.google.com ([2607:f8b0:4003:c0f::241]:44522) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVvIH-0004vA-1a for qemu-devel@nongnu.org; Thu, 21 Jun 2018 04:50:17 -0400 Received: by mail-ot0-x241.google.com with SMTP id w13-v6so2674783ote.11 for ; Thu, 21 Jun 2018 01:50:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180621062605.941-2-alex.bennee@linaro.org> References: <20180621062605.941-1-alex.bennee@linaro.org> <20180621062605.941-2-alex.bennee@linaro.org> From: Peter Maydell Date: Thu, 21 Jun 2018 09:49:55 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL v2 01/57] docker: docker.py wrap StringIO import for python3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Cc: QEMU Developers , "Emilio G. Cota" , Fam Zheng , "Daniel P. Berrange" , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , Richard Henderson , andrzej zaborowski , Aurelien Jarno , Alexander Graf On 21 June 2018 at 07:25, Alex Benn=C3=A9e wrote: > Although the docker.py is nominally python2 we actually invoke it with > the configured python from the configure script. > > Signed-off-by: Alex Benn=C3=A9e > > 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 This is fairly trivial, but it is a new unreviewed patch: would one of the python experts like to review it ? thanks -- PMM