bitbake: toaster: raise NotImplementedError

Raised NotImplementedError instead of Exception to be
able to catch it.

This is a preparation for removing sshbecontroller module.
It has to be done as code in bldcontrol/tests.py imports custom
NotImplementedException from sshbecontroller.

(Bitbake rev: c243ab6c83fe12d84777e4c3a18fd393827b9327)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh
2016-03-02 21:26:54 -08:00
committed by Richard Purdie
parent 96535ba720
commit 790b2d1387
3 changed files with 13 additions and 11 deletions

View File

@@ -48,13 +48,12 @@ class BEControllerTests(object):
self.assertTrue(err == '', "bitbake server pid %s not stopped" % err)
def test_serverStartAndStop(self):
from bldcontrol.sshbecontroller import NotImplementedException
obe = self._getBuildEnvironment()
bc = self._getBEController(obe)
try:
# setting layers, skip any layer info
bc.setLayers(BITBAKE_LAYER, POKY_LAYERS)
except NotImplementedException, e:
except NotImplementedError:
print "Test skipped due to command not implemented yet"
return True
# We are ok with the exception as we're handling the git already exists
@@ -74,14 +73,13 @@ class BEControllerTests(object):
self._serverForceStop(bc)
def test_getBBController(self):
from bldcontrol.sshbecontroller import NotImplementedException
obe = self._getBuildEnvironment()
bc = self._getBEController(obe)
layerSet = False
try:
# setting layers, skip any layer info
layerSet = bc.setLayers(BITBAKE_LAYER, POKY_LAYERS)
except NotImplementedException:
except NotImplementedError:
print "Test skipped due to command not implemented yet"
return True
# We are ok with the exception as we're handling the git already exists