diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-31 17:11:46 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-31 23:30:03 +0100 |
commit | 0b331bc4c97e29c47dcb6b4df9ee9a99795dd948 (patch) | |
tree | 621ff77294d5f2bb1f9a0f55e3d5dde1545cc639 | |
parent | 2e41f733fafc708149c03ace75d325580925fd88 (diff) | |
download | poky-0b331bc4c97e29c47dcb6b4df9ee9a99795dd948.tar.gz |
bitbake: 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.
(Bitbake rev: 8fd30ca6d271c125a8ea03ef0c5d7ab176900701)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/cookerdata.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index d105ab7b2d..2c9019f81f 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py | |||
@@ -327,6 +327,9 @@ class CookerDataBuilder(object): | |||
327 | self.mcdata[''] = self.data | 327 | self.mcdata[''] = self.data |
328 | 328 | ||
329 | def reset(self): | 329 | def reset(self): |
330 | # We may not have run parseBaseConfiguration() yet | ||
331 | if not hasattr(self, 'origdata'): | ||
332 | return | ||
330 | self.data = bb.data.createCopy(self.origdata) | 333 | self.data = bb.data.createCopy(self.origdata) |
331 | self.mcdata[''] = self.data | 334 | self.mcdata[''] = self.data |
332 | 335 | ||