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 17:36:53 +0100 |
commit | 8fd30ca6d271c125a8ea03ef0c5d7ab176900701 (patch) | |
tree | 2382348615c2e2a0c6e21644410b41e0170cd0ce | |
parent | 971272e84f4efe7ebd0037e164ba54f013a2a34e (diff) | |
download | bitbake-contrib-8fd30ca6d271c125a8ea03ef0c5d7ab176900701.tar.gz |
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 <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/cookerdata.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |