From 8a97c712e1139acec08c31b79ef54da0a72aa485 Mon Sep 17 00:00:00 2001 From: Augusto Wagner Andreoli Date: Thu, 7 Mar 2019 13:24:44 +0100 Subject: [PATCH] fix(xpytest): treat invalid password on Jenkins --- clit/dev.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clit/dev.py b/clit/dev.py index 0371e91..4c76c30 100644 --- a/clit/dev.py +++ b/clit/dev.py @@ -113,6 +113,11 @@ def results(ctx, result_file, jenkins_url: Tuple[str, ...], dont_capture): click.echo(ctx.get_help()) return + match = re.search(r"(?P<error>.+Invalid password.+)", contents) + if match: + click.secho(match.group("error"), fg="red") + exit(1) + all_tests = set(TEST_NAMES_REGEX.findall(contents)) expression = " or ".join(all_tests) if not dont_capture: