summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-09-29 10:27:39 +0000
committerRichard Purdie <rpurdie@rpsys.net>2007-09-29 10:27:39 +0000
commit0e22fa54ab226d755e436aa5bfe1b646604d2002 (patch)
tree15f44963e79c4da995dac010b29979a46e42a16f /classes
parentbbf939bd07cf9c814131e78d9152ec76c7bb6287 (diff)
insane.bbclass: Raise exceptions, not strings (from poky)
Diffstat (limited to 'classes')
-rw-r--r--classes/insane.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index d54d6c7b9e..83f8c43bba 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -101,7 +101,7 @@ def package_qa_get_elf(path, bits32):
def my_assert(expectation, result):
if not expectation == result:
#print "'%x','%x'" % (ord(expectation), ord(result))
- raise "This does not work as expected"
+ raise Exception("This does not work as expected")
my_assert = staticmethod(my_assert)
def __init__(self, name):
@@ -124,13 +124,13 @@ def package_qa_get_elf(path, bits32):
self.sex = self.data[ELFFile.EI_DATA]
if self.sex == chr(ELFFile.ELFDATANONE):
- raise "Can't be"
+ raise Exception("self.sex == ELFDATANONE")
elif self.sex == chr(ELFFile.ELFDATA2LSB):
self.sex = "<"
elif self.sex == chr(ELFFile.ELFDATA2MSB):
self.sex = ">"
else:
- raise "Even more worse"
+ raise Exception("Unknown self.sex")
def osAbi(self):
return ord(self.data[ELFFile.EI_OSABI])
@@ -376,7 +376,7 @@ def package_qa_check_rdepends(pkg, workdir, d):
bb.data.setVar('ROOT', '', localdata)
bb.data.setVar('ROOT_%s' % pkg, root, localdata)
- pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1)
+ pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, True)
if not pkgname:
pkgname = pkg
bb.data.setVar('PKG', pkgname, localdata)