summaryrefslogtreecommitdiffstats
path: root/lib/toaster/bldcontrol/models.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-03-02 21:26:54 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-07 17:20:52 +0000
commitc243ab6c83fe12d84777e4c3a18fd393827b9327 (patch)
tree05144a4360a628bedcd4982fff2bcd391455559a /lib/toaster/bldcontrol/models.py
parentb8044ce60af3f0b064cfba76c577503cc896e358 (diff)
downloadbitbake-c243ab6c83fe12d84777e4c3a18fd393827b9327.tar.gz
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. 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>
Diffstat (limited to 'lib/toaster/bldcontrol/models.py')
-rw-r--r--lib/toaster/bldcontrol/models.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/toaster/bldcontrol/models.py b/lib/toaster/bldcontrol/models.py
index a3a49ce47..bb613c68a 100644
--- a/lib/toaster/bldcontrol/models.py
+++ b/lib/toaster/bldcontrol/models.py
@@ -42,13 +42,17 @@ class BuildEnvironment(models.Model):
def get_artifact(self, path):
if self.betype == BuildEnvironment.TYPE_LOCAL:
return open(path, "r")
- raise Exception("FIXME: artifact download not implemented for build environment type %s" % self.get_betype_display())
+ raise NotImplementedError("FIXME: artifact download not implemented "\
+ "for build environment type %s" % \
+ self.get_betype_display())
def has_artifact(self, path):
import os
if self.betype == BuildEnvironment.TYPE_LOCAL:
return os.path.exists(path)
- raise Exception("FIXME: has artifact not implemented for build environment type %s" % self.get_betype_display())
+ raise NotImplementedError("FIXME: has artifact not implemented for "\
+ "build environment type %s" % \
+ self.get_betype_display())
# a BuildRequest is a request that the scheduler will build using a BuildEnvironment
# the build request queue is the table itself, ordered by state