From 384076a9f2194377e3208270136adf4d34313c6d Mon Sep 17 00:00:00 2001 From: Vishnu Kosuri Date: Sat, 14 Mar 2026 16:47:29 +0530 Subject: [PATCH] fix: pass runtime_json to program_switch() in main() When runtime_json was added as a required parameter to program_switch() in commit 071b89ad, the main() function was not updated to pass it. Running simple_controller.py directly from the command line would fail with TypeError: program_switch() missing 1 required positional argument. Pass args.runtime_conf_file as runtime_json, consistent with how run_exercise.py calls program_switch() with the runtime JSON file path. Signed-off-by: Vishnu Kosuri --- utils/p4runtime_lib/simple_controller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/p4runtime_lib/simple_controller.py b/utils/p4runtime_lib/simple_controller.py index 773d0b2f..8d57c612 100755 --- a/utils/p4runtime_lib/simple_controller.py +++ b/utils/p4runtime_lib/simple_controller.py @@ -65,7 +65,8 @@ def main(): device_id=args.device_id, sw_conf_file=sw_conf_file, workdir=workdir, - proto_dump_fpath=args.proto_dump_file) + proto_dump_fpath=args.proto_dump_file, + runtime_json=args.runtime_conf_file) def check_switch_conf(sw_conf, workdir):