Remove new year error

master
trémeur 12 months ago
parent 70c9cba2bf
commit 17b1ece7c1

@ -745,6 +745,7 @@ def yeargen(local=False):
filewrite.write("\"" + str(prevyear) + "</a></span>") filewrite.write("\"" + str(prevyear) + "</a></span>")
thisyear = int(datetime.datetime.now().strftime("%Y")) thisyear = int(datetime.datetime.now().strftime("%Y"))
if year < thisyear: if year < thisyear:
try:
nextyear = yearlist[listposition + 1] nextyear = yearlist[listposition + 1]
filewrite.write("<span style=\"float:right;\"><a href=\"") filewrite.write("<span style=\"float:right;\"><a href=\"")
if local: if local:
@ -752,6 +753,8 @@ def yeargen(local=False):
else: else:
filewrite.write("/fic/stats/" + str(nextyear)) filewrite.write("/fic/stats/" + str(nextyear))
filewrite.write("\">" + str(nextyear) + " »</a></span>") filewrite.write("\">" + str(nextyear) + " »</a></span>")
except:
pass
filewrite.write("</p>\n</div>\n</body>\n</html>") filewrite.write("</p>\n</div>\n</body>\n</html>")
filewrite.close() filewrite.close()

Loading…
Cancel
Save