Skip to contentSkip to conversation

cooker: Avoid tracebacks if data was never setup

PATCH New Richard Purdie 1 participant 1 message Oct 1, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cooker: Avoid tracebacks if data was never setup

Recent changes mean data might not be setup. If its not, avoid tracebacks.

---
 lib/bb/cooker.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/bb/cooker.py +2 -1
index 5442f7d225..1f4cc1e96d 100644
@@ -1679,7 +1679,8 @@ class BBCooker:
         if self.hashserv:
             self.hashserv.process.terminate()
             self.hashserv.process.join()
-        bb.event.fire(CookerExit(), self.data)
+        if hasattr(self, "data"):
+            bb.event.fire(CookerExit(), self.data)
 
     def shutdown(self, force = False):
         if force:
Signature · 1 line
2.25.1