aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-02-15 17:48:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-16 11:16:49 +0000
commitc136652f9c0b35aafa393e63567daf029ae03929 (patch)
tree699e3bac39bf15877a81deb992f769ce491ecd3a /meta/classes/insane.bbclass
parentd3af2058e2753516b9aaf7f6d71162363eea11d4 (diff)
downloadopenembedded-core-contrib-c136652f9c0b35aafa393e63567daf029ae03929.tar.gz
openembedded-core-contrib-c136652f9c0b35aafa393e63567daf029ae03929.tar.bz2
openembedded-core-contrib-c136652f9c0b35aafa393e63567daf029ae03929.zip
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(). Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 530e711ec4..aef08fe28e 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -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)