From a4ea51d43bdb95dbf458ba7b30f8d8dc70c4503c Mon Sep 17 00:00:00 2001 From: ydu Date: Mon, 22 Sep 2025 09:19:08 +0200 Subject: [PATCH] MSA-14977: Add method task_warning --- msa_sdk/msa_api.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/msa_sdk/msa_api.py b/msa_sdk/msa_api.py index a21184c1..8d843b24 100644 --- a/msa_sdk/msa_api.py +++ b/msa_sdk/msa_api.py @@ -106,6 +106,30 @@ def task_error(cls, comment, context, log_response=True): log_response)) sys.exit(1) + @classmethod + def task_warning(cls, comment, context, log_response=True): + """ + + Task warning and print. + + Parameters + ---------- + comment: String + Comment + context: Dictionary + Context + log_response: Bool + Write log to a file + + Returns + ------- + None + + """ + print(cls.process_content(constants.WARNING, comment, context, + log_response)) + sys.exit(2) + @classmethod def task_success(cls, comment, context, log_response=True): """