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: