Skip to content

Commit

Permalink
Fix run-vehicle-app.py crash if env vars are missing (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
BjoernAtBosch authored Jul 2, 2024
1 parent 18de1e2 commit 5095a56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runtime_local/src/run-vehicle-app.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ def run_app(executable_path: str, args: list[str], envs: list[str]):
"SDV_VEHICLEDATABROKER_ADDRESS": f"{vdb_address}:{vdb_port}",
"SDV_MQTT_ADDRESS": f"{mqtt_address}:{mqtt_port}",
}
middleware_config.update({env.split("=")[0]: env.split("=")[1] for env in envs})
if envs:
middleware_config.update(
{env.split("=")[0]: env.split("=")[1] for env in envs}
)

subprocess.check_call(program_args, env=middleware_config)
else:
Expand Down

0 comments on commit 5095a56

Please sign in to comment.