Exit if too many lines

main
Bob Mottram 2020-04-15 17:25:55 +01:00
parent a3c287bfd8
commit 6dd7054295
1 changed files with 6 additions and 0 deletions

View File

@ -5551,11 +5551,17 @@ def htmlHashTagSwarm(baseDir: str, actor: str) -> str:
if ' ' not in line:
line = tagsFile.readline()
lineCtr += 1
# don't read too many lines
if lineCtr > 4:
break
continue
postDaysSinceEpochStr = line.split(' ')[0]
if not postDaysSinceEpochStr.isdigit():
line = tagsFile.readline()
lineCtr += 1
# don't read too many lines
if lineCtr > 4:
break
continue
postDaysSinceEpoch = int(postDaysSinceEpochStr)
if postDaysSinceEpoch < daysSinceEpoch: