diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-20 11:57:44 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 08:10:04 +0100 |
commit | fcd6b38bab8517d83e1ed48eef1bca9a9a190f57 (patch) | |
tree | 74b1ae041ac6fbc838cc2b3a44953ed3e99360b9 /meta/lib/oe/qa.py | |
parent | dad9617809c60ec5f11d4780b0afa1cffa1efed5 (diff) | |
download | openembedded-core-contrib-fcd6b38bab8517d83e1ed48eef1bca9a9a190f57.tar.gz |
classes/lib: Complete transition to python3
This patch contains all the other misc pieces of the transition to
python3 which didn't make sense to be broken into individual patches.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/qa.py')
-rw-r--r-- | meta/lib/oe/qa.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py index 2c301419b0..75e7df8546 100644 --- a/meta/lib/oe/qa.py +++ b/meta/lib/oe/qa.py @@ -50,41 +50,41 @@ class ELFFile: if len(self.data) < ELFFile.EI_NIDENT + 4: raise NotELFFileError("%s is not an ELF" % self.name) - self.my_assert(self.data[0], chr(0x7f) ) - self.my_assert(self.data[1], 'E') - self.my_assert(self.data[2], 'L') - self.my_assert(self.data[3], 'F') + self.my_assert(self.data[0], 0x7f) + self.my_assert(self.data[1], ord('E')) + self.my_assert(self.data[2], ord('L')) + self.my_assert(self.data[3], ord('F')) if self.bits == 0: - if self.data[ELFFile.EI_CLASS] == chr(ELFFile.ELFCLASS32): + if self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS32: self.bits = 32 - elif self.data[ELFFile.EI_CLASS] == chr(ELFFile.ELFCLASS64): + elif self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS64: self.bits = 64 else: # Not 32-bit or 64.. lets assert raise NotELFFileError("ELF but not 32 or 64 bit.") elif self.bits == 32: - self.my_assert(self.data[ELFFile.EI_CLASS], chr(ELFFile.ELFCLASS32)) + self.my_assert(self.data[ELFFile.EI_CLASS], ELFFile.ELFCLASS32) elif self.bits == 64: - self.my_assert(self.data[ELFFile.EI_CLASS], chr(ELFFile.ELFCLASS64)) + self.my_assert(self.data[ELFFile.EI_CLASS], ELFFile.ELFCLASS64) else: raise NotELFFileError("Must specify unknown, 32 or 64 bit size.") - self.my_assert(self.data[ELFFile.EI_VERSION], chr(ELFFile.EV_CURRENT) ) + self.my_assert(self.data[ELFFile.EI_VERSION], ELFFile.EV_CURRENT) self.sex = self.data[ELFFile.EI_DATA] - if self.sex == chr(ELFFile.ELFDATANONE): + if self.sex == ELFFile.ELFDATANONE: raise NotELFFileError("self.sex == ELFDATANONE") - elif self.sex == chr(ELFFile.ELFDATA2LSB): + elif self.sex == ELFFile.ELFDATA2LSB: self.sex = "<" - elif self.sex == chr(ELFFile.ELFDATA2MSB): + elif self.sex == ELFFile.ELFDATA2MSB: self.sex = ">" else: raise NotELFFileError("Unknown self.sex") def osAbi(self): - return ord(self.data[ELFFile.EI_OSABI]) + return self.data[ELFFile.EI_OSABI] def abiVersion(self): - return ord(self.data[ELFFile.EI_ABIVERSION]) + return self.data[ELFFile.EI_ABIVERSION] def abiSize(self): return self.bits |