meta: replace os.popen with subprocess.Popen
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 29 May 2012 14:53:08 +0000 (22:53 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 May 2012 11:04:45 +0000 (12:04 +0100)
commit56d41c23a22dc570f5d0b35ee4da7aa92dc9ba7d
tree680564703be485d04f4bb0c43c9070ce838682c0
parent361dc7026113f7eb3595d6b83e367957e50ee029
meta: replace os.popen with subprocess.Popen

Replace os.popen with subprocess.Popen since the older function would
fail (more or less) silently if the executed program cannot be found

There are both bb.process.run() and bb.process.Popen() which wraps the
subprocess module, use it for simplifying the code.

Note: We don't need the "2>/dev/null" or "2>&1" since bb.process.run()
can handle it, it will raise exception when error occurs, we should
handle the exception ourselves if we want to ignore the error.

More info:
http://docs.python.org/library/subprocess.html#subprocess-replacements

[YOCTO #2454]

(From OE-Core rev: e83d8e58a6b107eea87df0ec233a1bc932b2c6ea)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/debian.bbclass
meta/classes/distrodata.bbclass
meta/classes/icecc.bbclass
meta/classes/insane.bbclass
meta/classes/kernel.bbclass
meta/classes/metadata_scm.bbclass
meta/classes/package.bbclass