Skip to content

Commit

Permalink
fix: Use default value for status_reboot if not present
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolai Buchwitz <[email protected]>
  • Loading branch information
nbuchwitz committed Feb 13, 2025
1 parent 72fd0d0 commit 225ee7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check_opnsense.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def check_updates(self) -> None:
data = self.request(url, method="post")

has_update = data["status"] in ("update", "upgrade")
needs_reboot = data["status_reboot"] == "1"
needs_reboot = data.get("status_reboot", 0) == "1"

if has_update:
self.check_result = CheckState.WARNING
Expand Down

0 comments on commit 225ee7a

Please sign in to comment.