From: Alexander Popov Date: Wed, 16 Oct 2024 13:45:25 +0000 (+0300) Subject: Don't crash if `sysctl.conf` has no options for parsing X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=e4896e00d3cc3fab44415acec147a1a7b8104322;p=kconfig-hardened-check.git Don't crash if `sysctl.conf` has no options for parsing This fixes the broken Codeberg CI. --- diff --git a/kernel_hardening_checker/engine.py b/kernel_hardening_checker/engine.py index 139660a..45bebb4 100755 --- a/kernel_hardening_checker/engine.py +++ b/kernel_hardening_checker/engine.py @@ -348,7 +348,6 @@ def populate_simple_opt_with_data(opt: SimpleOptCheckType, data: DictOrTuple, da assert(opt.opt_type != 'complex'), f'unexpected opt_type "{opt.opt_type}" for {opt}' assert(opt.opt_type in SIMPLE_OPTION_TYPES), f'invalid opt_type "{opt.opt_type}"' assert(data_type in SIMPLE_OPTION_TYPES), f'invalid data_type "{data_type}"' - assert(data), 'empty data' if data_type != opt.opt_type: return