mirror of https://gitlab.com/bashrc2/epicyon
Check that post was saved
parent
b19ab510bd
commit
192236d58e
4
inbox.py
4
inbox.py
|
@ -1623,19 +1623,21 @@ def inboxAfterCapabilities(session,keyId: str,handle: str,messageJson: {}, \
|
|||
obtainAvatarForReplyPost(session,baseDir,httpPrefix,domain,personCache,postJsonObject,debug)
|
||||
|
||||
# save the post to file
|
||||
postSavedToFile=False
|
||||
tries=0
|
||||
while tries<5:
|
||||
try:
|
||||
with open(destinationFilename, 'w+') as fp:
|
||||
commentjson.dump(postJsonObject, fp, indent=2, sort_keys=False)
|
||||
postSavedToFile=True
|
||||
break
|
||||
except Exception as e:
|
||||
print(e)
|
||||
time.sleep(1)
|
||||
tries+=1
|
||||
|
||||
if postSavedToFile:
|
||||
inboxUpdateCalendar(baseDir,handle,postJsonObject)
|
||||
|
||||
inboxStorePostToHtmlCache(translate,baseDir,httpPrefix, \
|
||||
session,cachedWebfingers,personCache, \
|
||||
handle.split('@')[0],domain,port, \
|
||||
|
|
Loading…
Reference in New Issue