From 9fa68a27b61d5a852410e3b6b7ecdbb4d2a33d29 Mon Sep 17 00:00:00 2001 From: fram3d Date: Sat, 26 Aug 2023 01:03:33 +0200 Subject: [PATCH] fix issue with using same name for two different variables --- prep.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prep.py b/prep.py index 4c4b415..8cfd463 100644 --- a/prep.py +++ b/prep.py @@ -70,7 +70,7 @@ events = load_events() events = sort_events(events) write_events(events) -events = [] +newevents = [] for event in events: date, time, location, title = event.split(", ") @@ -88,14 +88,14 @@ for event in events: else: future_event.append(" "+location.strip()+" ") future_event.append(" "+title+" ") - events.append("\n"+"\n".join(future_event)+"\n") + newevents.append("\n"+"\n".join(future_event)+"\n") with open("pages/sr/events.html","wt") as file: file.writelines(["

Događaji

\n", "\n", "\n"]) - file.writelines(events) + file.writelines(newevents) file.writelines(["
DatumVremeMestoTema
"]) #with open("pages/en/events.html","wt") as file: # file.writelines(["

Events

", "", "\n\n\n\n\n"]) # file.writelines(events) -# file.writelines(["
DateTimePlaceTheme
"]) \ No newline at end of file +# file.writelines([""])