Verified Commit a6fecf86 authored by Karel Koci's avatar Karel Koci 🤘
Browse files

supervisor: fix possible None return for auto_approve_time

This can cause exception later on and prevent updater from execution.
parent eaeb2342
Pipeline #72363 passed with stage
in 3 minutes and 13 seconds
......@@ -78,7 +78,7 @@ def auto_approve_time():
with EUci() as uci:
try:
value = uci.get_integer("updater", "approvals", "auto_grant_seconds")
return value // 3600 if value > 0 else None
return value // 3600 if value > 0 else 0
except UciExceptionNotFound:
return 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment