From b3c57d778d5ff3dab9e5a0b84403a0f19b020a87 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Mon, 14 Aug 2017 15:09:43 +0800 Subject: [PATCH] update with jenkins-mail-py 0.2.2 --- ate/cli.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ate/cli.py b/ate/cli.py index 7761667a..b2799bd1 100644 --- a/ate/cli.py +++ b/ate/cli.py @@ -50,7 +50,7 @@ def main(): report name is ignored, use generated time instead.") results = {} - flag = "SUCCESS" + subject = "SUCCESS" for testset_path in set(args.testset_paths): @@ -73,9 +73,10 @@ def main(): } if len(result.successes) != result.testsRun: - flag = "FAILED" + subject = "FAILED" + flag_code = 0 if subject == "SUCCESS" else 1 if mailer and mailer.config_ready: - mailer.send_mail(flag, content=results) + mailer.send_mail(subject, results, flag_code) - return 0 if flag == "SUCCESS" else 1 + return flag_code