From 2ee793179e345f3355462c8d2753543bc397a2aa Mon Sep 17 00:00:00 2001 From: root Date: Sun, 16 Jan 2022 13:41:03 +0000 Subject: Reformat code --- main.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index f58474f..04736c8 100644 --- a/main.py +++ b/main.py @@ -16,7 +16,7 @@ DBFILE = "data.db" db = sql.db(DBFILE) -#weather = weather_met_no() +# weather = weather_met_no() # Check if running on correct device : defensive coding against running # on the wrong device @@ -38,7 +38,7 @@ def main_page(): "main.html", actual_temp=boiler.temperature, target_temp=boiler.target - #forecast_temp=weather.temperature() + # forecast_temp=weather.temperature() ) @@ -72,18 +72,19 @@ def export(opt): elif opt == "pdf": pass else: - return render_template( - "error.html", error="Invalid export type" - ) + return render_template("error.html", error="Invalid export type") + def updater(): while True: boiler.update() time.sleep(5) + def webapp(): app.run(host="0.0.0.0") + if __name__ == "__main__": t1 = Thread(target=webapp) t2 = Thread(target=updater) -- cgit v1.2.3