diff options
author | 2014-11-27 14:59:21 +0000 | |
---|---|---|
committer | 2014-11-28 14:02:29 +0000 | |
commit | c52841445d8db8f84c4da34203b195fea5874247 (patch) | |
tree | 6ab2e55a407202eb6fcd5df2dfec6166457cbffd /lib | |
parent | e30c11af7bc8a1f3d8c9198ee3c0065bd6b447cc (diff) | |
download | bitbake-c52841445d8db8f84c4da34203b195fea5874247.tar.gz |
cooker: Allow featureset in error state
Currently, if an invalid PR service is selected the server will error
with a traceback. This is because its set into the error state and the
setFeature code will then fail since its not in the initial state.
Modifying the featureset in the error state is acceptable, we just need
to ensure we don't trigger a reset, that would happen from whichever
code handles the error.
[YOCTO #6934]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/cooker.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index a08c14bbd..df9a0cab0 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -165,13 +165,13 @@ class BBCooker: def setFeatures(self, features): # we only accept a new feature set if we're in state initial, so we can reset without problems - if self.state != state.initial: + if self.state != state.initial and self.state != state.error: raise Exception("Illegal state for feature set change") original_featureset = list(self.featureset) for feature in features: self.featureset.setFeature(feature) bb.debug(1, "Features set %s (was %s)" % (original_featureset, list(self.featureset))) - if (original_featureset != list(self.featureset)): + if (original_featureset != list(self.featureset)) and self.state != state.error: self.reset() def initConfigurationData(self): |