From 5ad138ccf65b81f715ffee9d4cef07a3094f6da2 Mon Sep 17 00:00:00 2001 From: rscmbbng Date: Mon, 3 Dec 2018 05:14:59 +0100 Subject: [PATCH] add short sleep to not get empty file! --- slog.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/slog.py b/slog.py index 7ec0be6..f542628 100644 --- a/slog.py +++ b/slog.py @@ -18,6 +18,8 @@ else: db = sqlite3.connect('stats.db') c = db.cursor() +time.sleep(5) #otherwise we risk grabbing an empty file + try: r = requests.get(url) r.raise_for_status() # in case of 404