mirror of https://gitlab.com/bashrc2/epicyon
Handle failure to load post
parent
ad89134511
commit
2210837a33
|
@ -2137,8 +2137,14 @@ def htmlIndividualPost(translate: {}, \
|
||||||
postFilename=locatePost(baseDir,nickname,domain,postJsonObject['object']['inReplyTo'])
|
postFilename=locatePost(baseDir,nickname,domain,postJsonObject['object']['inReplyTo'])
|
||||||
if not postFilename:
|
if not postFilename:
|
||||||
break
|
break
|
||||||
with open(postFilename, 'r') as fp:
|
loadedPost=False
|
||||||
postJsonObject=commentjson.load(fp)
|
try:
|
||||||
|
with open(postFilename, 'r') as fp:
|
||||||
|
postJsonObject=commentjson.load(fp)
|
||||||
|
loadedPost=True
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
if loadedPost:
|
||||||
postStr= \
|
postStr= \
|
||||||
individualPostAsHtml(iconsDir,translate,None, \
|
individualPostAsHtml(iconsDir,translate,None, \
|
||||||
baseDir,session,wfRequest,personCache, \
|
baseDir,session,wfRequest,personCache, \
|
||||||
|
|
Loading…
Reference in New Issue