From 2ef4b6a69a9c3e47f9c2fba22ec06ad6d3a1af69 Mon Sep 17 00:00:00 2001 From: Alexandr Bogomyakov Date: Sun, 17 Dec 2023 17:15:54 +0200 Subject: [PATCH] Fix --- main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 8e7b9d3..6142335 100644 --- a/main.py +++ b/main.py @@ -251,8 +251,11 @@ def _dynamic(): @app.route('/sync', methods=['GET', 'POST']) def sync(): if request.method == 'GET': - with open('sync.log', 'r') as file: - lines = file.readlines() + try: + with open('sync.log', 'r') as file: + lines = file.readlines() + except: + lines = [] return render_template( 'sync.html', SERVERS=SERVERS,