]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
bitbake: prserv/serv: Tweak stdout manipulation to be stream safe
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Jan 2017 23:23:52 +0000 (23:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 5 Jan 2017 13:54:07 +0000 (13:54 +0000)
commit9f6a1043f68580ed9604e750fd0f993f933bb66e
treecad95efa0bb8893159252cb2180c6c6a66d1d9e8
parent3c9b1febc4840cd1b7d6784076d61efe8e87271f
bitbake: prserv/serv: Tweak stdout manipulation to be stream safe

We've been seeing oe-selftest failures under puzzling circumstances. It
turns out if you run oe-selftest on a machine with xmlrunner installed
and have the recent tinfoil2 changes, the launching of PR server crashes
leading to selftest hanging if using an autoloaded PR server.

The reason is that xmlrunner uses an io.StringIO object as stdout/stderr
instead of the usual io.TextIOWrapper and StringIO lacks a fileno() method.

We have to deal with both cases and in the python way, we try and then seek
forgivness if we see an AttributeError or UnSupportedOperation exception.
Unfortunately we have to deal with both cases as we may be performing a
traditiional double fork() from the commandline, or a larger python program.

[YOCTO #10866]

(Bitbake rev: 26243f04e3af652291d13e85c084057104fe155b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/prserv/serv.py