forked from indymedia/epicyon
Check for presence of cache directory
parent
6fae77f138
commit
eac1ffe993
1
cache.py
1
cache.py
|
@ -23,6 +23,7 @@ def storePersonInCache(baseDir: str,personUrl: str,personJson: {},personCache: {
|
||||||
return
|
return
|
||||||
|
|
||||||
# store to file
|
# store to file
|
||||||
|
if os.path.isdir(baseDir+'/cache/actors'):
|
||||||
cacheFilename=baseDir+'/cache/actors/'+personUrl.replace('/','#')+'.json'
|
cacheFilename=baseDir+'/cache/actors/'+personUrl.replace('/','#')+'.json'
|
||||||
if not os.path.isfile(cacheFilename):
|
if not os.path.isfile(cacheFilename):
|
||||||
with open(cacheFilename, 'w') as fp:
|
with open(cacheFilename, 'w') as fp:
|
||||||
|
|
Loading…
Reference in New Issue