Improve handling of existing issues, only abort after five consecutive failures, Come On Eileen.

This commit is contained in:
Klaus-Uwe Mitterer 2017-02-07 00:55:45 +01:00
parent 6bdd458df3
commit 2d55c9337a

View file

@ -43,6 +43,7 @@ def getIssue(issue, makepdf = True):
i += 1 i += 1
if i == 1: if i == 1:
os.rmdir(str(issue))
return False return False
if i < 5: if i < 5:
@ -51,10 +52,19 @@ def getIssue(issue, makepdf = True):
if makepdf: if makepdf:
makePDF(issue, i-1) makePDF(issue, i-1)
else:
print("[NOTICE] Skipping issue: %i (already exists)" % issue)
def getterLoop(start = 53): def getterLoop(start = 53):
i = start i = start
j = 0
while j < 5:
if getIssue(i) is False:
j += 1
else:
j = 0
while getIssue(i) is not False:
i += 1 i += 1
if __name__ == "__main__": if __name__ == "__main__":