diff options
| author | Mauro Carvalho Chehab <[email protected]> | 2025-05-21 09:02:15 +0000 |
|---|---|---|
| committer | Jonathan Corbet <[email protected]> | 2025-05-21 09:53:40 +0000 |
| commit | 27565cfcd78315ce0410adb79ae14d49e325a2b1 (patch) | |
| tree | 75affea7bb68e78a010401fabd1de1de4cdc25c2 /scripts/lib/kdoc/kdoc_files.py | |
| parent | docs: kerneldoc.py: simplify exception handling logic (diff) | |
| download | kernel-27565cfcd78315ce0410adb79ae14d49e325a2b1.tar.gz kernel-27565cfcd78315ce0410adb79ae14d49e325a2b1.zip | |
scripts: kernel-doc: prevent a KeyError when checking output
If a file sent to KernelFiles.msg() method doesn't exist, instead
of producing a KeyError, output an error message.
Reported-by: Randy Dunlap <[email protected]>
Closes: https://lore.kernel.org/linux-doc/[email protected]/T/#ma43ae9d8d0995b535cf5099e5381dace0410de04
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Acked-by: Akira Yokosawa <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
Message-ID: <4efa177f2157a7ec009cc197dfc2d87e6f32b165.1747817887.git.mchehab+huawei@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
| -rw-r--r-- | scripts/lib/kdoc/kdoc_files.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/lib/kdoc/kdoc_files.py b/scripts/lib/kdoc/kdoc_files.py index 630aa5ca6460..9be4a64df71d 100644 --- a/scripts/lib/kdoc/kdoc_files.py +++ b/scripts/lib/kdoc/kdoc_files.py @@ -271,6 +271,10 @@ class KernelFiles(): no_doc_sections) msg = "" + if fname not in self.results: + self.config.log.warning("No kernel-doc for file %s", fname) + continue + for name, arg in self.results[fname]: m = self.out_msg(fname, name, arg) |
