diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta/lib/oe/qa.py | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/poky/meta/lib/oe/qa.py')
-rw-r--r-- | external/poky/meta/lib/oe/qa.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/external/poky/meta/lib/oe/qa.py b/external/poky/meta/lib/oe/qa.py index 59c72ce5..ea831b93 100644 --- a/external/poky/meta/lib/oe/qa.py +++ b/external/poky/meta/lib/oe/qa.py @@ -1,3 +1,7 @@ +# +# SPDX-License-Identifier: GPL-2.0-only +# + import os, struct, mmap class NotELFFileError(Exception): @@ -37,13 +41,15 @@ class ELFFile: def __init__(self, name): self.name = name self.objdump_output = {} + self.data = None # Context Manager functions to close the mmap explicitly def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): - self.data.close() + if self.data: + self.data.close() def open(self): with open(self.name, "rb") as f: |