replace common.file_helpers.mkdirs_exists_ok with python os.makedirs funtion (#30618)

replace common.file_helpers.mkdirs_exists_ok with python os.makedirs function
old-commit-hash: db35dcd0b5353d9c009fcf5817e611125a6b0b8b
This commit is contained in:
Greg Hogan
2023-12-06 09:55:29 -08:00
committed by GitHub
parent a2df43c05e
commit e91032efb3
6 changed files with 6 additions and 20 deletions
+1 -2
View File
@@ -9,7 +9,6 @@ import time
import glob
from typing import NoReturn
from openpilot.common.file_helpers import mkdirs_exists_ok
import openpilot.selfdrive.sentry as sentry
from openpilot.system.hardware.hw import Paths
from openpilot.system.swaglog import cloudlog
@@ -128,7 +127,7 @@ def report_tombstone_apport(fn):
new_fn = f"{date}_{get_commit(default='nocommit')[:8]}_{safe_fn(clean_path)}"[:MAX_TOMBSTONE_FN_LEN]
crashlog_dir = os.path.join(Paths.log_root(), "crash")
mkdirs_exists_ok(crashlog_dir)
os.makedirs(crashlog_dir, exist_ok=True)
# Files could be on different filesystems, copy, then delete
shutil.copy(fn, os.path.join(crashlog_dir, new_fn))