From 9dffde13356fdf9ac8876137592fae8c718a8fc1 Mon Sep 17 00:00:00 2001 From: miaobinbin <1420548086@qq.com> Date: Sat, 14 Sep 2024 10:52:14 +0800 Subject: [PATCH] fix: build.is_good() did not retrieve the build result, resulting in always failure returns --- jenkinsapi/build.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jenkinsapi/build.py b/jenkinsapi/build.py index 3134d521..fc964d8c 100644 --- a/jenkinsapi/build.py +++ b/jenkinsapi/build.py @@ -388,9 +388,13 @@ def is_good(self) -> bool: Return a bool, true if the build was good. If the build is still running, return False. """ - return (not self.is_running()) and self._data[ - "result" - ] == STATUS_SUCCESS + # return (not self.is_running()) and self._data[ + # "result" + # ] == STATUS_SUCCESS + if self.is_running(): + return False + self._data = self._poll() + return self._data["result"] == STATUS_SUCCESS def block_until_complete(self, delay: int = 15) -> None: count: int = 0