mirror of https://gitlab.com/bashrc2/epicyon
Without exception
parent
a589a14ca3
commit
214bb22898
19
posts.py
19
posts.py
|
@ -1660,8 +1660,8 @@ def createBoxBase(baseDir: str,boxname: str, \
|
||||||
boxname+'?min_id='+postId+'&page=true'
|
boxname+'?min_id='+postId+'&page=true'
|
||||||
# get the full path of the post file
|
# get the full path of the post file
|
||||||
filePath = postFilename
|
filePath = postFilename
|
||||||
try:
|
#try:
|
||||||
if os.path.isfile(filePath):
|
if os.path.isfile(filePath):
|
||||||
if currPage == pageNumber and postsOnPageCtr <= itemsPerPage:
|
if currPage == pageNumber and postsOnPageCtr <= itemsPerPage:
|
||||||
# get the post as json
|
# get the post as json
|
||||||
with open(filePath, 'r') as fp:
|
with open(filePath, 'r') as fp:
|
||||||
|
@ -1693,16 +1693,15 @@ def createBoxBase(baseDir: str,boxname: str, \
|
||||||
postId+'&page=true'
|
postId+'&page=true'
|
||||||
# remember the last post filename for use with prev
|
# remember the last post filename for use with prev
|
||||||
prevPostFilename = postFilename
|
prevPostFilename = postFilename
|
||||||
if postsOnPageCtr > itemsPerPage:
|
if postsOnPageCtr >= itemsPerPage:
|
||||||
break
|
break
|
||||||
# count the pages
|
# count the pages
|
||||||
if currPage != pageNumber:
|
postsCtr += 1
|
||||||
postsCtr += 1
|
if postsCtr >= itemsPerPage:
|
||||||
if postsCtr >= itemsPerPage:
|
postsCtr = 0
|
||||||
postsCtr = 0
|
currPage += 1
|
||||||
currPage += 1
|
#except Exception as e:
|
||||||
except Exception as e:
|
# print(e)
|
||||||
print(e)
|
|
||||||
if headerOnly:
|
if headerOnly:
|
||||||
return boxHeader
|
return boxHeader
|
||||||
return boxItems
|
return boxItems
|
||||||
|
|
Loading…
Reference in New Issue