forked from indymedia/epicyon
Count posts
parent
451684fdca
commit
514630d3b9
4
posts.py
4
posts.py
|
@ -2170,7 +2170,9 @@ def archivePostsForPerson(httpPrefix: str,nickname: str,domain: str,baseDir: str
|
||||||
os.mkdir(archiveDir)
|
os.mkdir(archiveDir)
|
||||||
boxDir = createPersonDir(nickname,domain,baseDir,boxname)
|
boxDir = createPersonDir(nickname,domain,baseDir,boxname)
|
||||||
postsInBox=os.scandir(boxDir)
|
postsInBox=os.scandir(boxDir)
|
||||||
noOfPosts=len(postsInBox)
|
noOfPosts=0
|
||||||
|
for f in postsInBox:
|
||||||
|
noOfPosts+=1
|
||||||
if noOfPosts<=maxPostsInBox:
|
if noOfPosts<=maxPostsInBox:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue