aboutsummaryrefslogtreecommitdiff
path: root/prometheus_pacman_exporter/__init__.py
diff options
context:
space:
mode:
authorDennis Fink2026-09-28 21:42:05 +0200
committerDennis Fink2026-09-28 21:42:05 +0200
commit92ee4e2a8ee821659cf2deea1a96659bb8d231cd (patch)
tree337a3eb19f863ebabc9f7f2641dc2ba6e50e2ca0 /prometheus_pacman_exporter/__init__.py
parentccb0316f4158e4e4047102a3a23f842891d82b8b (diff)
downloadprometheus-pacman-exporter-92ee4e2a8ee821659cf2deea1a96659bb8d231cd.tar.gz
prometheus-pacman-exporter-92ee4e2a8ee821659cf2deea1a96659bb8d231cd.zip
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.
Diffstat (limited to 'prometheus_pacman_exporter/__init__.py')
-rw-r--r--prometheus_pacman_exporter/__init__.py2
1 files changed, 1 insertions, 1 deletions
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,
),
)