Commit 754663e3 authored by Chris Jewell's avatar Chris Jewell
Browse files

sys.sleep -> time.sleep

parent d6dedac1
"""Loads COVID-19 case data"""
import sys
import time
from warnings import warn
import requests
import json
......@@ -58,7 +58,7 @@ class CasesData:
return df
except ConnectionResetError:
print("Failed", flush=True)
sys.sleep(secs * 2 ** i)
time.sleep(secs * 2 ** i)
raise ConnectionError(
f"Data download timed out after {max_tries} attempts"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment