From 8ef46266f3c8d7d7b267c20bd9cd8a4445f6ea18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Mon, 16 May 2022 21:31:43 +0200 Subject: [PATCH] added threading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index dc2a6af..024421b 100644 --- a/main.py +++ b/main.py @@ -9,6 +9,7 @@ try: from flask import Flask, render_template, request, redirect, url_for, flash, jsonify import json from argparse import ArgumentParser + import threading except ImportError: print('Some modules are missing. Try to install them with "pip3 install -r requirements.txt"') exit() @@ -156,7 +157,7 @@ if __name__ == '__main__': mode = 0 power = True - app.run(host='0.0.0.0', port=80, use_reloader=False, debug=True) + threading.Thread(target=lambda: app.run(host='0.0.0.0', port=80)).start() try: while True: