diff --git a/jenkinsapi/fingerprint.py b/jenkinsapi/fingerprint.py index 5ccc4cca..c813d9bc 100644 --- a/jenkinsapi/fingerprint.py +++ b/jenkinsapi/fingerprint.py @@ -71,6 +71,7 @@ def valid(self) -> bool: return True def validate_for_build(self, filename: str, job: str, build: int) -> bool: + _ = filename # Currently unused if not self.valid(): log.info("Fingerprint is not known to jenkins.") return False @@ -81,10 +82,10 @@ def validate_for_build(self, filename: str, job: str, build: int) -> bool: if self._data["original"]["name"] == job: if self._data["original"]["number"] == build: return True - if self._data["fileName"] != filename: + if self._data["hash"] != self.id_: log.info( - msg="Filename from jenkins (%s) did not match provided (%s)" - % (self._data["fileName"], filename) + msg="File hash from Jenkins (%s) did not match local hash (%s)" + % (self._data["hash"], self.id_) ) return False for usage_item in self._data["usage"]: