1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

insane: Drop oe.qa.add_message usage

Drop the oe.qa.add_message() usage in favour of oe.qa.handle_error() which has
code allowing it to be optimised with contains usage.

The patch also drops unused return values which we stopped using a while ago
and drops the now unneeded function parameters, generally leading to cleaner
code.

The code should be functionally equivalent.

(From OE-Core rev: 9b2eea9fd4eab4f5e12e955738db22091b91f698)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2024-08-28 17:10:28 +01:00
parent 89c308bc47
commit 796ef498fa
4 changed files with 89 additions and 146 deletions
-6
View File
@@ -215,12 +215,6 @@ def handle_error(error_class, error_msg, d):
return True
handle_error.visitorcode = handle_error_visitorcode
def add_message(messages, section, new_msg):
if section not in messages:
messages[section] = new_msg
else:
messages[section] = messages[section] + "\n" + new_msg
def exit_with_message_if_errors(message, d):
qa_fatal_errors = bb.utils.to_boolean(d.getVar("QA_ERRORS_FOUND"), False)
if qa_fatal_errors: