From e4896e00d3cc3fab44415acec147a1a7b8104322 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Wed, 16 Oct 2024 16:45:25 +0300 Subject: [PATCH] Don't crash if `sysctl.conf` has no options for parsing This fixes the broken Codeberg CI. --- kernel_hardening_checker/engine.py | 1 - 1 file changed, 1 deletion(-) 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 -- 2.31.1