diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-28 17:10:28 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-29 21:58:19 +0100 |
commit | 796ef498fa8cbf60232ce6c539114a8f4e06d494 (patch) | |
tree | ace0e4b9e0dda30fba8209032e5c23ff1ae9c6ae /meta/lib/oe/qa.py | |
parent | 89c308bc476509bcbeb72d5723d7e1ccedf3ae73 (diff) | |
download | poky-796ef498fa8cbf60232ce6c539114a8f4e06d494.tar.gz |
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>
Diffstat (limited to 'meta/lib/oe/qa.py')
-rw-r--r-- | meta/lib/oe/qa.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py index e338ad6439..cd36cb5070 100644 --- a/meta/lib/oe/qa.py +++ b/meta/lib/oe/qa.py | |||
@@ -215,12 +215,6 @@ def handle_error(error_class, error_msg, d): | |||
215 | return True | 215 | return True |
216 | handle_error.visitorcode = handle_error_visitorcode | 216 | handle_error.visitorcode = handle_error_visitorcode |
217 | 217 | ||
218 | def add_message(messages, section, new_msg): | ||
219 | if section not in messages: | ||
220 | messages[section] = new_msg | ||
221 | else: | ||
222 | messages[section] = messages[section] + "\n" + new_msg | ||
223 | |||
224 | def exit_with_message_if_errors(message, d): | 218 | def exit_with_message_if_errors(message, d): |
225 | qa_fatal_errors = bb.utils.to_boolean(d.getVar("QA_ERRORS_FOUND"), False) | 219 | qa_fatal_errors = bb.utils.to_boolean(d.getVar("QA_ERRORS_FOUND"), False) |
226 | if qa_fatal_errors: | 220 | if qa_fatal_errors: |