[bitbake-devel] [PATCH 06/10] cookerdata: Avoid tracebacks from early reset() calls
Richard Purdie
richard.purdie at linuxfoundation.org
Thu Aug 31 16:38:36 UTC 2017
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 <richard.purdie at linuxfoundation.org>
---
lib/bb/cookerdata.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index d105ab7..2c9019f 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
--
2.7.4
More information about the bitbake-devel
mailing list