mirror of
https://github.com/mvt-project/mvt.git
synced 2026-08-18 00:47:23 +02:00
fix: open timeline.csv and alerts_timeline.csv with write mode to prevent cross run contamination
This commit is contained in:
@@ -219,7 +219,7 @@ class AlertStore:
|
|||||||
return alerts
|
return alerts
|
||||||
|
|
||||||
def save_timeline(self, timeline_path: str) -> None:
|
def save_timeline(self, timeline_path: str) -> None:
|
||||||
with open(timeline_path, "a+", encoding="utf-8") as handle:
|
with open(timeline_path, "w", encoding="utf-8") as handle:
|
||||||
csvoutput = csv.writer(
|
csvoutput = csv.writer(
|
||||||
handle,
|
handle,
|
||||||
delimiter=",",
|
delimiter=",",
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ def save_timeline(timeline: list, timeline_path: str, is_utc: bool = True) -> No
|
|||||||
:param timeline_path: Path to the csv file to store the timeline to
|
:param timeline_path: Path to the csv file to store the timeline to
|
||||||
|
|
||||||
"""
|
"""
|
||||||
with open(timeline_path, "a+", encoding="utf-8") as handle:
|
with open(timeline_path, "w", encoding="utf-8") as handle:
|
||||||
csvoutput = csv.writer(
|
csvoutput = csv.writer(
|
||||||
handle, delimiter=",", quotechar='"', quoting=csv.QUOTE_ALL, escapechar="\\"
|
handle, delimiter=",", quotechar='"', quoting=csv.QUOTE_ALL, escapechar="\\"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user