summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2016-10-01 04:47:11 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-04 16:29:05 +0100
commit575ee2d19e1ad4ae39413ca2fa2c0a7cd580e336 (patch)
treec9287e3c37b89da4ba17e690f93c5eab25b57a8a
parent56be38f83415ded0484f9cb22362704e79096d28 (diff)
downloadpoky-575ee2d19e1ad4ae39413ca2fa2c0a7cd580e336.tar.gz
cmake: Use bb.fatal() instead of raising FuncFailed
This sets a good example and avoids unnecessarily contributing to perceived complexity and cargo culting. Motivating quote below: < kergoth> the *original* intent was for the function/task to error via whatever appropriate means, bb.fatal, whatever, and funcfailed was what you'd catch if you were calling exec_func/exec_task. that is, it's what those functions raise, not what metadata functions should be raising < kergoth> it didn't end up being used that way < kergoth> but there's really never a reason to raise it yourself FuncFailed.__init__ takes a 'name' argument rather than a 'msg' argument, which also shows that the original purpose got lost. (From OE-Core rev: ff310dd103e16a5345a4bb48090af05f50171de3) Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/cmake/cmake_3.6.1.bb2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-devtools/cmake/cmake_3.6.1.bb b/meta/recipes-devtools/cmake/cmake_3.6.1.bb
index 67ba9c473d..850d6de231 100644
--- a/meta/recipes-devtools/cmake/cmake_3.6.1.bb
+++ b/meta/recipes-devtools/cmake/cmake_3.6.1.bb
@@ -14,7 +14,7 @@ python () {
14 docdir=d.getVar("docdir", True) 14 docdir=d.getVar("docdir", True)
15 15
16 if not docdir.startswith(prefix): 16 if not docdir.startswith(prefix):
17 raise bb.build.FuncFailed('docdir must contain prefix as its prefix') 17 bb.fatal('docdir must contain prefix as its prefix')
18 18
19 docdir_stripped = docdir[len(prefix):] 19 docdir_stripped = docdir[len(prefix):]
20 if len(docdir_stripped) > 0 and docdir_stripped[0] == '/': 20 if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':