From 8fd30ca6d271c125a8ea03ef0c5d7ab176900701 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 31 Aug 2017 17:11:46 +0100 Subject: cookerdata: Avoid tracebacks from early reset() calls cooker.reset() can be called before we've actually setup the datastore. Gracefully handle this case instead of the current traceback+exit. Signed-off-by: Richard Purdie --- lib/bb/cookerdata.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py index d105ab7b2..2c9019f81 100644 --- a/lib/bb/cookerdata.py +++ b/lib/bb/cookerdata.py @@ -327,6 +327,9 @@ class CookerDataBuilder(object): self.mcdata[''] = self.data def reset(self): + # We may not have run parseBaseConfiguration() yet + if not hasattr(self, 'origdata'): + return self.data = bb.data.createCopy(self.origdata) self.mcdata[''] = self.data -- cgit 1.2.3-korg