From 3309ac51c5d144dff10b457d8fcf8c160e23dd23 Mon Sep 17 00:00:00 2001 From: lucky lin <8618993@qq.com> Date: Mon, 3 Jun 2024 14:37:39 +0800 Subject: [PATCH] Update statsd.py --- selfdrive/statsd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/statsd.py b/selfdrive/statsd.py index 94572b82..4293c89b 100755 --- a/selfdrive/statsd.py +++ b/selfdrive/statsd.py @@ -163,7 +163,7 @@ def main() -> NoReturn: if len(os.listdir(STATS_DIR)) < STATS_DIR_FILE_LIMIT: if len(result) > 0: stats_path = os.path.join(STATS_DIR, f"{current_time.timestamp():.0f}_{idx}") - with atomic_write_in_dir(stats_path) as f: + with atomic_write_in_dir(stats_path, mode="w", overwrite=True) as f: f.write(result) idx += 1 else: