diff --git a/statsgen.py b/statsgen.py index fb2001f..e7f0b9f 100644 --- a/statsgen.py +++ b/statsgen.py @@ -745,13 +745,16 @@ def yeargen(local=False): filewrite.write("\">« " + str(prevyear) + "") thisyear = int(datetime.datetime.now().strftime("%Y")) if year < thisyear: - nextyear = yearlist[listposition + 1] - filewrite.write("" + str(nextyear) + " »") + try: + nextyear = yearlist[listposition + 1] + filewrite.write("" + str(nextyear) + " »") + except: + pass filewrite.write("

\n\n\n") filewrite.close()