Re: [Qemu-devel] [PATCH v2 1/7] docker.py: don't hang on large docker output

2016-09-06 Thread Eric Blake
On 09/06/2016 08:53 PM, Fam Zheng wrote: >>> >>> Too many blank lines? Otherwise looks good. >> >> You caught me sneaking in a PEP-8 compliance fix. ;) > > Ah, no problem. I just didn't know. > >> >> Is qemu using a custom code style for Python sources? If so, is it >> documented somewhere? > >

Re: [Qemu-devel] [PATCH v2 1/7] docker.py: don't hang on large docker output

2016-09-06 Thread Fam Zheng
On Tue, 09/06 20:31, Sascha Silbe wrote: > Dear Fam, > > Fam Zheng writes: > > > On Wed, 08/24 20:30, Sascha Silbe wrote: > [tests/docker/docker.py] > >> @@ -25,6 +25,10 @@ from tarfile import TarFile, TarInfo > >> from StringIO import StringIO > >> from shutil import copy, rmtree > >> > >>

Re: [Qemu-devel] [PATCH v2 1/7] docker.py: don't hang on large docker output

2016-09-06 Thread Sascha Silbe
Dear Fam, Fam Zheng writes: > On Wed, 08/24 20:30, Sascha Silbe wrote: [tests/docker/docker.py] >> @@ -25,6 +25,10 @@ from tarfile import TarFile, TarInfo >> from StringIO import StringIO >> from shutil import copy, rmtree >> >> + >> +DEVNULL = open(os.devnull, 'wb') >> + >> + > > Too many b

Re: [Qemu-devel] [PATCH v2 1/7] docker.py: don't hang on large docker output

2016-09-05 Thread Fam Zheng
On Wed, 08/24 20:30, Sascha Silbe wrote: > Unlike Popen.communicate(), subprocess.call() doesn't read from the > stdout file descriptor. If the child process produces more output than > fits into the pipe buffer, it will block indefinitely. > > If we don't intend to consume the output, just send i

[Qemu-devel] [PATCH v2 1/7] docker.py: don't hang on large docker output

2016-08-24 Thread Sascha Silbe
Unlike Popen.communicate(), subprocess.call() doesn't read from the stdout file descriptor. If the child process produces more output than fits into the pipe buffer, it will block indefinitely. If we don't intend to consume the output, just send it straight to /dev/null to avoid this issue. Signe