Count posts

main2
Bob Mottram 2019-10-19 11:19:19 +01:00
parent 451684fdca
commit 514630d3b9
1 changed files with 3 additions and 1 deletions

View File

@ -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