mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 09:32:14 +02:00
insane.bbclass: don't raise strings, but exceptions
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2679 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user