Skip to content

Commit 33c1646

Browse files
authored
fix(clip): ignore unknown Params keys (commaai#35226)
* fix: ignore params configured by forks * comment * dont bother logging count or in normal flow * better log
1 parent e8394a2 commit 33c1646

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tools/clip/run.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from cereal.messaging import SubMaster
1818
from openpilot.common.basedir import BASEDIR
19-
from openpilot.common.params import Params
19+
from openpilot.common.params import Params, UnknownKeyName
2020
from openpilot.common.prefix import OpenpilotPrefix
2121
from openpilot.tools.lib.route import Route
2222
from openpilot.tools.lib.logreader import LogReader, ReadMode, comma_api_source
@@ -126,8 +126,12 @@ def populate_car_params(route: Route):
126126
entries = init_data.params.entries
127127
for cp in entries:
128128
key, value = cp.key, cp.value
129-
params.put(key, value)
130-
logger.info(f'persisted {len(entries)} CarParam(s)')
129+
try:
130+
params.put(key, value)
131+
except UnknownKeyName:
132+
# forks of openpilot may have other Params keys configured. ignore these
133+
logger.warning(f"unknown Params key '{key}', skipping")
134+
logger.debug('persisted CarParams')
131135

132136

133137
def start_proc(args: list[str], env: dict[str, str]):

0 commit comments

Comments
 (0)