]> code.ossystems Code Review - openembedded-core.git/commit
context.py: Do not mask exceptions needlessly.
authorPaulo Neves <ptsneves@gmail.com>
Mon, 6 Aug 2018 11:26:58 +0000 (13:26 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Aug 2018 09:51:28 +0000 (10:51 +0100)
commit719b0e88b875b067551067874778061f99b8c4b4
tree56fe74d718ac06242594e6c79c741c4f4fca2a01
parent70af5f22f7a52fb4cbe64486948bcb2425a56d9e
context.py: Do not mask exceptions needlessly.

There were a lot of assumptions in the controller import
code of context.py which were not true anymore.  These
assumptions reflected themselves by catching exceptions and
re-raising them with unhelpful error messages in other parts
of the code.

This commit does not fix the classes controller classes that
became broken after the refactor but at least it allows for
the exceptions to be thrown where the imports fail, thus
actually showing what exactly went wrong with the import.

An example of such an improvement is that before if the
controller class failed during it's init contructor the
controller would just be skipped and the task would just
complain it could not find the controller.  Now for example,
if there is a NamerError due to a variable not being
declared, the user will get that report.

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/runtime/context.py