lib/qa.py: raise ValueError if file isn't an ELF

Instead of raising a generic Exception that can't be handled specifically, raise
a ValueError.  Also update the callers so any unexpected exceptions are not
ignored.

Also, rename isBigEngian() to isBigEndian().

(From OE-Core rev: c136652f9c0b35aafa393e63567daf029ae03929)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2016-02-15 17:48:25 +00:00
committed by Richard Purdie
parent 334e1b5e0e
commit 7a700f59d9
3 changed files with 11 additions and 9 deletions

View File

@@ -80,7 +80,7 @@ python uninative_changeinterp () {
elf = oe.qa.ELFFile(f)
try:
elf.open()
except:
except ValueError:
continue
#bb.warn("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f))