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

svupdater: fix - pyuci expects str, not int

parent 892991bb
Pipeline #44786 passed with stage
in 2 minutes and 38 seconds
......@@ -44,7 +44,7 @@ def set_enabled(enabled):
"""
with Uci() as uci:
uci.set('updater', 'override', 'override')
uci.set('updater', 'override', 'disable', int(not bool(enabled)))
uci.set('updater', 'override', 'disable', str(not bool(enabled)))
def approvals():
......@@ -65,7 +65,7 @@ def set_approvals(enabled):
"""
with Uci() as uci:
uci.set('updater', 'approvals', 'approvals')
uci.set('updater', 'approvals', 'need', int(bool(enabled)))
uci.set('updater', 'approvals', 'need', str(bool(enabled)))
def auto_approve_time():
......@@ -89,6 +89,6 @@ def set_auto_approve_time(approve_time):
with Uci() as uci:
if approve_time > 0:
uci.set('updater', 'approvals', 'approvals')
uci.set('updater', 'approvals', 'auto_grant_seconds', int(approve_time) * 3600)
uci.set('updater', 'approvals', 'auto_grant_seconds', str(int(approve_time) * 3600))
else:
uci.delete('updater', 'autorun', 'auto_approve_time')
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