manman-sync: handle non-200 gracefully

This commit is contained in:
Maciej Krüger 2021-12-17 13:06:16 +01:00 committed by Alexander List
parent c8e86123b4
commit 4411acd89d

View File

@ -49,6 +49,11 @@ if uci:get_bool('gluon-manman-sync', 'sync', 'enabled') then
return 2
end
if code ~= 200 then
print('E: got status code ' .. code)
return 2
end
if code < 1 then
print('E: failed to fetch')
return 2