From 478b9e790923f92339919489cdd700b9c9a04220 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 20 Oct 2019 12:59:47 +0100 Subject: [PATCH] Debug --- posts.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/posts.py b/posts.py index 134aa6fba..f05a5d3fc 100644 --- a/posts.py +++ b/posts.py @@ -2045,6 +2045,7 @@ def createBoxBase(session,baseDir: str,boxname: str, \ if maxPostCtr: if postsCtr>=maxPostCtr: break + print(str(postsInBox)) else: postsCtr=createBoxIndex(boxDir,postsInBoxDict) @@ -2080,10 +2081,12 @@ def createBoxBase(session,baseDir: str,boxname: str, \ # Are we at the starting page yet? if prevPostFilename and currPage==pageNumber and postsCtr==0: # update the prev entry for the last message id - postId = prevPostFilename.split('#statuses#')[1].replace('#activity','') - boxHeader['prev']= \ - httpPrefix+'://'+domain+'/users/'+nickname+'/'+ \ - boxname+'?min_id='+postId+'&page=true' + if '#statuses#' in prevPostFilename: + postId = prevPostFilename.split('#statuses#')[1].replace('#activity','') + boxHeader['prev']= \ + httpPrefix+'://'+domain+'/users/'+nickname+'/'+ \ + boxname+'?min_id='+postId+'&page=true' + # get the full path of the post file filePath = postFilename try: