mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
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:
committed by
Richard Purdie
parent
334e1b5e0e
commit
7a700f59d9
@@ -792,7 +792,9 @@ def package_qa_walk(warnfuncs, errorfuncs, skip, package, d):
|
||||
elf = oe.qa.ELFFile(path)
|
||||
try:
|
||||
elf.open()
|
||||
except:
|
||||
except (IOError, ValueError):
|
||||
# IOError can happen if the packaging control files disappear,
|
||||
# ValueError means the file isn't an ELF.
|
||||
elf = None
|
||||
for func in warnfuncs:
|
||||
func(path, package, d, elf, warnings)
|
||||
|
||||
Reference in New Issue
Block a user