summaryrefslogtreecommitdiff
path: root/poky/meta/lib/oe/qa.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/lib/oe/qa.py')
-rw-r--r--poky/meta/lib/oe/qa.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/poky/meta/lib/oe/qa.py b/poky/meta/lib/oe/qa.py
index 21066c4dc..ea831b930 100644
--- a/poky/meta/lib/oe/qa.py
+++ b/poky/meta/lib/oe/qa.py
@@ -41,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: