Skip to content

Commit c23de7c

Browse files
vegardJonathan Corbet
authored andcommitted
docs: kernel_feat.py: fix build error for missing files
If the directory passed to the '.. kernel-feat::' directive does not exist or the get_feat.pl script does not find any files to extract features from, Sphinx will report the following error: Sphinx parallel build error: UnboundLocalError: local variable 'fname' referenced before assignment make[2]: *** [Documentation/Makefile:102: htmldocs] Error 2 This is due to how I changed the script in c48a7c4 ("docs: kernel_feat.py: fix potential command injection"). Before that, the filename passed along to self.nestedParse() in this case was weirdly just the whole get_feat.pl invocation. We can fix it by doing what kernel_abi.py does -- just pass self.arguments[0] as 'fname'. Fixes: c48a7c4 ("docs: kernel_feat.py: fix potential command injection") Cc: Justin Forbes <jforbes@fedoraproject.org> Cc: Salvatore Bonaccorso <carnil@debian.org> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Link: https://lore.kernel.org/r/20240205175133.774271-2-vegard.nossum@oracle.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent d546978 commit c23de7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/sphinx/kernel_feat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def run(self):
109109
else:
110110
out_lines += line + "\n"
111111

112-
nodeList = self.nestedParse(out_lines, fname)
112+
nodeList = self.nestedParse(out_lines, self.arguments[0])
113113
return nodeList
114114

115115
def nestedParse(self, lines, fname):

0 commit comments

Comments
 (0)