Skip to content

Commit 21cea97

Browse files
add return None statements
1 parent d872934 commit 21cea97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pythonbpf/vmlinux_parser/import_detector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,19 @@ def vmlinux_proc(tree: ast.AST, module):
106106

107107
if not import_statements:
108108
logger.info("No vmlinux imports found")
109-
return
109+
return None
110110

111111
# Import vmlinux module directly
112112
try:
113113
vmlinux_mod = importlib.import_module("vmlinux")
114114
except ImportError:
115115
logger.warning("Could not import vmlinux module")
116-
return
116+
return None
117117

118118
source_file = inspect.getsourcefile(vmlinux_mod)
119119
if source_file is None:
120120
logger.warning("Cannot find source for vmlinux module")
121-
return
121+
return None
122122

123123
with open(source_file, "r") as f:
124124
mod_ast = ast.parse(f.read(), filename=source_file)

0 commit comments

Comments
 (0)