From 5c67ada3bb9eb54e25b26482c523eb02597c3f05 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 20 Oct 2019 13:09:07 +0100 Subject: [PATCH] Extract status number --- posts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/posts.py b/posts.py index b6010b73..2c583333 100644 --- a/posts.py +++ b/posts.py @@ -2040,7 +2040,10 @@ def createBoxBase(session,baseDir: str,boxname: str, \ maxPostCtr=(itemsPerPage+3)*pageNumber with open(indexFilename, 'r') as indexFile: for postFilename in indexFile: - postsInBox[postsCtr]=os.path.join(boxDir, postFilename.replace('\n','')) + statusNumber=getStatusNumberFromPostFilename(postFilename) + if not statusNumber: + continue + postsInBox[statusNumber]=os.path.join(boxDir, postFilename.replace('\n','')) postsCtr+=1 if maxPostCtr: if postsCtr>=maxPostCtr: