while true do
- vals = process_file()
- process_vals(vals)
+ pcall( function ()
- if log_con then
- process_graphs()
- end
+ vals = process_file()
+ process_vals(vals)
+
+ if log_con then
+ process_graphs()
+ end
- os.execute("inotifywait -e MODIFY \""..weather_file.."\"")
- socket.sleep(3)
+ os.execute("inotifywait -e MODIFY \""..weather_file.."\"")
+
+ end)
+
+ socket.sleep(3)
end