From 92ee4e2a8ee821659cf2deea1a96659bb8d231cd Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Mon, 28 Sep 2026 21:42:05 +0200 Subject: fix(commands): handle empty orphan queries consistently Treat pacman exit status 1 as an empty result for orphan package queries, matching the handling used by other queries that may legitimately return no packages. --- prometheus_pacman_exporter/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prometheus_pacman_exporter/__init__.py b/prometheus_pacman_exporter/__init__.py index 384e4c4..6543f2f 100644 --- a/prometheus_pacman_exporter/__init__.py +++ b/prometheus_pacman_exporter/__init__.py @@ -71,7 +71,7 @@ BASE_QUERIES: tuple[PackageQuery, ...] = ( (*PACMAN_BASE_COMMAND, "--deps", "--unrequired"), "orphan packages", metrics.ORPHAN_PACKAGES, - (0, 1), + empty_exit_codes=PACMAN_EMPTY_EXIT_CODES, ), ) -- cgit v1.3.1