From 5408cf52c727d8941e53a7a1adf8e51ae23b1ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Sch=C3=BCtte?= Date: Thu, 2 Nov 2017 10:20:18 +0100 Subject: [PATCH] Fix bug in extract_last_occurence (#568) --- jenkins/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/worker.py b/jenkins/worker.py index 4ea8d1f..0f84530 100644 --- a/jenkins/worker.py +++ b/jenkins/worker.py @@ -40,7 +40,7 @@ class Pattern(object): None if no match was found. """ matches = self.regex.findall(text) - if matches: + if not matches: return None return matches[-1]