From e1b40d2c778712af171315e0605fe75256011459 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi <76248539+r41k0u@users.noreply.github.com> Date: Fri, 14 Aug 2026 03:04:28 +0530 Subject: [PATCH] Fix comment in maps_pass.py --- pythonbpf/maps/maps_pass.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pythonbpf/maps/maps_pass.py b/pythonbpf/maps/maps_pass.py index 7e3b1ed..ca07845 100644 --- a/pythonbpf/maps/maps_pass.py +++ b/pythonbpf/maps/maps_pass.py @@ -176,10 +176,9 @@ def process_bpf_map(func_node, compilation_context): if isinstance(rval, ast.Call) and isinstance(rval.func, ast.Name): handler = MapProcessorRegistry.get_processor(rval.func.id) if handler is None: - # Falling back to a hash map here used to produce an object that - # compiled cleanly and was then rejected by the kernel, because the - # map carried the wrong type and none of the real map type's - # validation ran. A misspelled map type is a program error. + # Raise an exception and fail the build because the + # map carried the wrong type. A misspelled map type + # is a program error. known = ", ".join(sorted(MapProcessorRegistry.known_types())) raise ValueError( f"Unknown map type '{rval.func.id}' returned by '{map_name}'. "