Skip to content

Commit 74e4c7b

Browse files
committed
Do not use unchanged together with an error
1 parent a863a31 commit 74e4c7b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libprobe/probe.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,10 @@ async def _connect(self):
381381
self._connecting = False
382382

383383
def _unchanged(self, check: type[Check], path: tuple,
384-
result: dict | None) -> bool:
384+
result: dict | None, error: dict | None) -> bool:
385385
if not check.unchanged_eol:
386386
return False
387-
if result is None:
387+
if result is None or error is not None:
388388
self._prev_checks.pop(path, None)
389389
return False
390390

@@ -419,7 +419,7 @@ def send(
419419
if no_count:
420420
framework['no_count'] = True
421421

422-
if self._unchanged(check, path, result):
422+
if self._unchanged(check, path, result, error):
423423
logging.debug(
424424
f'using unchanged for asset Id {asset_id}, check: {check.key}')
425425
framework['unchanged'] = True

libprobe/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.0.1'
1+
__version__ = '2.0.2'

0 commit comments

Comments
 (0)