Message ID | 20230109113442.20946-1-msuchanek@suse.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 5fbea42387eba1c7517fcad79099df706def7054 |
Delegated to: | BPF |
Headers | show |
Series | bpf_doc: Fix build error with older python versions | expand |
Hello: This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <andrii@kernel.org>: On Mon, 9 Jan 2023 12:34:42 +0100 you wrote: > The ability to subscript match result as an array is only available > since python 3.6. Existing code in bpf_doc uses the older group() > interface but commit 8a76145a2ec2 adds code using the new interface. > > Use the old interface consistently to avoid build error on older > distributions like the below: > > [...] Here is the summary with links: - bpf_doc: Fix build error with older python versions https://git.kernel.org/bpf/bpf-next/c/5fbea42387eb You are awesome, thank you!
diff --git a/scripts/bpf_doc.py b/scripts/bpf_doc.py index e8d90829f23e..38d51e05c7a2 100755 --- a/scripts/bpf_doc.py +++ b/scripts/bpf_doc.py @@ -271,7 +271,7 @@ class HeaderParser(object): if capture: fn_defines_str += self.line helper_name = capture.expand(r'bpf_\1') - self.helper_enum_vals[helper_name] = int(capture[2]) + self.helper_enum_vals[helper_name] = int(capture.group(2)) self.helper_enum_pos[helper_name] = i i += 1 else: