Browse Source

add short sleep to not get empty file!

master
rscmbbng 6 years ago
parent
commit
5ad138ccf6
  1. 2
      slog.py

2
slog.py

@ -18,6 +18,8 @@ else:
db = sqlite3.connect('stats.db') db = sqlite3.connect('stats.db')
c = db.cursor() c = db.cursor()
time.sleep(5) #otherwise we risk grabbing an empty file
try: try:
r = requests.get(url) r = requests.get(url)
r.raise_for_status() # in case of 404 r.raise_for_status() # in case of 404

Loading…
Cancel
Save