fix bootlog params copying from other prefix (#31381)

* fix

* also in prefix

* no d

* get it from the path
pull/31386/head
Justin Newberry 1 year ago committed by GitHub
parent 135deb4324
commit 1a1f30c4b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      selfdrive/manager/helpers.py

@ -1,9 +1,10 @@
import errno
import fcntl
import os import os
import sys import sys
import fcntl import pathlib
import errno
import signal
import shutil import shutil
import signal
import subprocess import subprocess
import tempfile import tempfile
import threading import threading
@ -52,7 +53,9 @@ def write_onroad_params(started, params):
def save_bootlog(): def save_bootlog():
# copy current params # copy current params
tmp = tempfile.mkdtemp() tmp = tempfile.mkdtemp()
shutil.copytree(Params().get_param_path() + "/..", tmp, dirs_exist_ok=True) params_dirname = pathlib.Path(Params().get_param_path()).name
params_dir = os.path.join(tmp, params_dirname)
shutil.copytree(Params().get_param_path(), params_dir, dirs_exist_ok=True)
def fn(tmpdir): def fn(tmpdir):
env = os.environ.copy() env = os.environ.copy()

Loading…
Cancel
Save