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

sys.sleep -> time.sleep

parent d6dedac1
"""Loads COVID-19 case data""" """Loads COVID-19 case data"""
import sys import time
from warnings import warn from warnings import warn
import requests import requests
import json import json
...@@ -58,7 +58,7 @@ class CasesData: ...@@ -58,7 +58,7 @@ class CasesData:
return df return df
except ConnectionResetError: except ConnectionResetError:
print("Failed", flush=True) print("Failed", flush=True)
sys.sleep(secs * 2 ** i) time.sleep(secs * 2 ** i)
raise ConnectionError( raise ConnectionError(
f"Data download timed out after {max_tries} attempts" f"Data download timed out after {max_tries} attempts"
Supports Markdown
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