summaryrefslogtreecommitdiffstats
path: root/bitbake/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:23:03 +0000
commit790b2d1387a150b85612ad38a53bab788154e4bb (patch)
treed4d2820e945ec16ab07e680563475beb6b425cc9 /bitbake/lib/toaster/bldcontrol/models.py
parent96535ba720b2e2afe27ff2454d5b6031624ab7ab (diff)
downloadpoky-790b2d1387a150b85612ad38a53bab788154e4bb.tar.gz
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>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/models.py')
-rw-r--r--bitbake/lib/toaster/bldcontrol/models.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py
index a3a49ce472..bb613c68a2 100644
--- a/bitbake/lib/toaster/bldcontrol/models.py
+++ b/bitbake/lib/toaster/bldcontrol/models.py
@@ -42,13 +42,17 @@ class BuildEnvironment(models.Model):
42 def get_artifact(self, path): 42 def get_artifact(self, path):
43 if self.betype == BuildEnvironment.TYPE_LOCAL: 43 if self.betype == BuildEnvironment.TYPE_LOCAL:
44 return open(path, "r") 44 return open(path, "r")
45 raise Exception("FIXME: artifact download not implemented for build environment type %s" % self.get_betype_display()) 45 raise NotImplementedError("FIXME: artifact download not implemented "\
46 "for build environment type %s" % \
47 self.get_betype_display())
46 48
47 def has_artifact(self, path): 49 def has_artifact(self, path):
48 import os 50 import os
49 if self.betype == BuildEnvironment.TYPE_LOCAL: 51 if self.betype == BuildEnvironment.TYPE_LOCAL:
50 return os.path.exists(path) 52 return os.path.exists(path)
51 raise Exception("FIXME: has artifact not implemented for build environment type %s" % self.get_betype_display()) 53 raise NotImplementedError("FIXME: has artifact not implemented for "\
54 "build environment type %s" % \
55 self.get_betype_display())
52 56
53# a BuildRequest is a request that the scheduler will build using a BuildEnvironment 57# a BuildRequest is a request that the scheduler will build using a BuildEnvironment
54# the build request queue is the table itself, ordered by state 58# the build request queue is the table itself, ordered by state