Skip to content

Commit b4e1762

Browse files
committed
don't warn about no kmods being detected when it's disabled
Signed-off-by: Zen <[email protected]>
1 parent dbc09fa commit b4e1762

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.6.4'
2+
__version__ = '2.7.0'
33

44
from pathlib import Path
55
from subprocess import run
@@ -131,6 +131,9 @@ def _autodetect_modules_lsmod(self) -> list[str]:
131131
@check_dict('hostonly', value=True, log_level=30, message="hostonly is not set, skipping.")
132132
def autodetect_modules(self) -> None:
133133
""" Autodetects kernel modules from lsmod and/or lspci -k. """
134+
if not self['kmod_autodetect_lsmod'] and not self['kmod_autodetect_lspci']:
135+
self.logger.debug("No autodetection methods are enabled.")
136+
return
134137
_autodetect_modules_lsmod(self)
135138
_autodetect_modules_lspci(self)
136139
if self['_kmod_auto']:

0 commit comments

Comments
 (0)