mirror of https://gitlab.com/bashrc2/epicyon
Use different dictionary
parent
7e0ae8d8e1
commit
3328336639
3
posts.py
3
posts.py
|
@ -2029,6 +2029,7 @@ def createBoxBase(session,baseDir: str,boxname: str, \
|
||||||
|
|
||||||
# post filenames sorted in descending order
|
# post filenames sorted in descending order
|
||||||
postsInBoxDict={}
|
postsInBoxDict={}
|
||||||
|
postsInBox={}
|
||||||
|
|
||||||
indexFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxname+'.index'
|
indexFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxname+'.index'
|
||||||
if os.path.isfile(indexFilename):
|
if os.path.isfile(indexFilename):
|
||||||
|
@ -2039,7 +2040,7 @@ def createBoxBase(session,baseDir: str,boxname: str, \
|
||||||
maxPostCtr=itemsPerPage*pageNumber
|
maxPostCtr=itemsPerPage*pageNumber
|
||||||
with open(indexFilename, 'r') as indexFile:
|
with open(indexFilename, 'r') as indexFile:
|
||||||
for postFilename in indexFile:
|
for postFilename in indexFile:
|
||||||
postsInBoxDict[postsCtr]=os.path.join(boxDir, postFilename)
|
postsInBox[postsCtr]=os.path.join(boxDir, postFilename)
|
||||||
postsCtr+=1
|
postsCtr+=1
|
||||||
if maxPostCtr:
|
if maxPostCtr:
|
||||||
if postsCtr>=maxPostCtr:
|
if postsCtr>=maxPostCtr:
|
||||||
|
|
Loading…
Reference in New Issue