qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL v2 01/57] docker: docker.py wrap StringIO import


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL v2 01/57] docker: docker.py wrap StringIO import for python3
Date: Thu, 21 Jun 2018 09:49:55 +0100

On 21 June 2018 at 07:25, Alex Bennée <address@hidden> 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ée <address@hidden>
>
> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]