Remove new year error

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

@ -745,13 +745,16 @@ 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:
nextyear = yearlist[listposition + 1] try:
filewrite.write("<span style=\"float:right;\"><a href=\"") nextyear = yearlist[listposition + 1]
if local: filewrite.write("<span style=\"float:right;\"><a href=\"")
filewrite.write("/home/mdd/Documents/drive/proj/fic-archive/build/stats/" + str(nextyear) + "/index.html") if local:
else: filewrite.write("/home/mdd/Documents/drive/proj/fic-archive/build/stats/" + str(nextyear) + "/index.html")
filewrite.write("/fic/stats/" + str(nextyear)) else:
filewrite.write("\">" + str(nextyear) + " »</a></span>") filewrite.write("/fic/stats/" + str(nextyear))
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