diff options
| author | Dennis Fink | 2026-09-29 14:18:50 +0200 |
|---|---|---|
| committer | Dennis Fink | 2026-09-29 14:18:50 +0200 |
| commit | 08ff13802e585ee8ce6d4e6b6da5815182aa7b58 (patch) | |
| tree | 48aa3057da4269e5af39afb93c593c7cde442297 /prometheus_pacman_exporter | |
| parent | 92ee4e2a8ee821659cf2deea1a96659bb8d231cd (diff) | |
| download | prometheus-pacman-exporter-08ff13802e585ee8ce6d4e6b6da5815182aa7b58.tar.gz prometheus-pacman-exporter-08ff13802e585ee8ce6d4e6b6da5815182aa7b58.zip | |
fix(commands): do not fail on silent nonzero exits
Only abort command execution when a non-accepted exit code is
accompanied by stderr output.
Allow silent nonzero exits to return normally so package queries that
use them to indicate an empty result are not incorrectly treated as
failures.
Diffstat (limited to '')
| -rw-r--r-- | prometheus_pacman_exporter/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/prometheus_pacman_exporter/__init__.py b/prometheus_pacman_exporter/__init__.py index 6543f2f..e957662 100644 --- a/prometheus_pacman_exporter/__init__.py +++ b/prometheus_pacman_exporter/__init__.py @@ -166,7 +166,7 @@ def run_command( error(f"Command ({command_string}) failed with exit code:", str(result.returncode)) if result.stderr: error("stderr:", result.stderr.strip()) - ctx.exit(1) + ctx.exit(1) return result |
