mirror of https://gitlab.com/bashrc2/epicyon
Don't save to cache for public only posts
parent
966baef1cd
commit
b3e205c7c2
|
@ -2115,14 +2115,16 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \
|
||||||
else:
|
else:
|
||||||
postStr=galleryStr
|
postStr=galleryStr
|
||||||
|
|
||||||
# save to posts cache on file
|
if not showPublicOnly:
|
||||||
if not os.path.isdir(htmlPostCacheDir):
|
# save to posts cache on file
|
||||||
os.mkdir(htmlPostCacheDir)
|
if not os.path.isdir(htmlPostCacheDir):
|
||||||
try:
|
os.mkdir(htmlPostCacheDir)
|
||||||
with open(cachedPostFilename, 'w') as fp:
|
|
||||||
fp.write(postStr)
|
try:
|
||||||
except Exception as e:
|
with open(cachedPostFilename, 'w') as fp:
|
||||||
print('ERROR: saving post to cache '+str(e))
|
fp.write(postStr)
|
||||||
|
except Exception as e:
|
||||||
|
print('ERROR: saving post to cache '+str(e))
|
||||||
|
|
||||||
return postStr
|
return postStr
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue