Skip to content

Commit 574b2f1

Browse files
committed
Throw a visual error when kmod firmware is misssing, as it may not be
required Signed-off-by: Zen <[email protected]>
1 parent 42a6c35 commit 574b2f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ugrd/kmod/kmod.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = 'desultory'
2-
__version__ = '2.1.1'
2+
__version__ = '2.1.2'
33

44
from pathlib import Path
55
from subprocess import run
@@ -186,6 +186,9 @@ def _add_kmod_firmware(self, kmod: str) -> None:
186186

187187
for firmware in self['_kmod_modinfo'][kmod]['firmware']:
188188
firmware_path = Path('/lib/firmware') / firmware
189+
if not firmware_path.exists():
190+
self.logger.error("[%s] Firmware file does not exist: %s" % (kmod, firmware_path))
191+
continue
189192
self.logger.debug("[%s] Adding firmware file to dependencies: %s" % (kmod, firmware_path))
190193
self['dependencies'] = firmware_path
191194

0 commit comments

Comments
 (0)