Skip to content

Commit

Permalink
fix cache bug, thanks dojafoja
Browse files Browse the repository at this point in the history
  • Loading branch information
BrewToolsDev committed Nov 8, 2020
1 parent 7bef254 commit fef39a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Uses numpy, matplotlib, PIL and Tkinter

Covid Data provided by covidtracking.com

Api data licensed under Creative Commons CC BY 4.0.
API data licensed under Creative Commons CC BY 4.0.

##### Output
<p align="center"><img src="https://raw.githubusercontent.com/BrewToolsDev/covidgrapher/main/example.png"></p>
Expand Down
5 changes: 2 additions & 3 deletions covidgrapher.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@
REVERSED_DATA_OPTIONS_MAP = {}
for v in DATA_OPTIONS_MAP: REVERSED_DATA_OPTIONS_MAP[DATA_OPTIONS_MAP[v]]=v

DIR = os.path.dirname(os.getcwd())
DIR = os.path.dirname(__file__)
cache_folder = os.path.join(DIR, "cache")
if not os.path.isdir(cache_folder): os.mkdir(cache_folder)
json_folder = os.path.join(cache_folder, "json")
if not os.path.isdir(json_folder): os.mkdir(json_folder)
if not os.path.isdir(json_folder): os.makedirs(json_folder, exist_ok = True)

"""CACHING-----------------"""
ETAGFILE = "cache/json/etags.json"
Expand Down

0 comments on commit fef39a6

Please sign in to comment.