forked from indymedia/epicyon
Prepend to tags file
parent
8ef0a72489
commit
7eca0b33be
11
inbox.py
11
inbox.py
|
@ -94,10 +94,13 @@ def storeHashTags(baseDir: str,postJsonObject: {}) -> None:
|
||||||
tagsFile.close()
|
tagsFile.close()
|
||||||
else:
|
else:
|
||||||
if postUrl not in open(tagsFilename).read():
|
if postUrl not in open(tagsFilename).read():
|
||||||
tagsFile=open(tagsFilename, "a+")
|
try:
|
||||||
if tagsFile:
|
with open(tagsFilename, 'r+') as tagsFile:
|
||||||
tagsFile.write(postUrl+'\n')
|
content = tagsFile.read()
|
||||||
tagsFile.close()
|
tagsFile.seek(0, 0)
|
||||||
|
tagsFile.write(postUrl+'\n'+content)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
def inboxStorePostToHtmlCache(recentPostsCache: {},maxRecentPosts: int, \
|
def inboxStorePostToHtmlCache(recentPostsCache: {},maxRecentPosts: int, \
|
||||||
translate: {}, \
|
translate: {}, \
|
||||||
|
|
Loading…
Reference in New Issue