Itterate through less lines

main
Bob Mottram 2020-05-31 13:03:35 +01:00
parent 9d75c54271
commit 420d299ec3
1 changed files with 4 additions and 4 deletions

View File

@ -5755,13 +5755,13 @@ def htmlHashTagSwarm(baseDir: str, actor: str) -> str:
line = tagsFile.readline() line = tagsFile.readline()
lineCtr = 1 lineCtr = 1
tagCtr = 0 tagCtr = 0
maxLineCtr = 4 maxLineCtr = 1
while line: while line:
if ' ' not in line: if ' ' not in line:
line = tagsFile.readline() line = tagsFile.readline()
lineCtr += 1 lineCtr += 1
# don't read too many lines # don't read too many lines
if lineCtr > maxLineCtr: if lineCtr >= maxLineCtr:
break break
continue continue
postDaysSinceEpochStr = line.split(' ')[0] postDaysSinceEpochStr = line.split(' ')[0]
@ -5769,7 +5769,7 @@ def htmlHashTagSwarm(baseDir: str, actor: str) -> str:
line = tagsFile.readline() line = tagsFile.readline()
lineCtr += 1 lineCtr += 1
# don't read too many lines # don't read too many lines
if lineCtr > maxLineCtr: if lineCtr >= maxLineCtr:
break break
continue continue
postDaysSinceEpoch = int(postDaysSinceEpochStr) postDaysSinceEpoch = int(postDaysSinceEpochStr)
@ -5783,7 +5783,7 @@ def htmlHashTagSwarm(baseDir: str, actor: str) -> str:
line = tagsFile.readline() line = tagsFile.readline()
lineCtr += 1 lineCtr += 1
# don't read too many lines # don't read too many lines
if lineCtr > maxLineCtr: if lineCtr >= maxLineCtr:
break break
# remove old hashtags # remove old hashtags