Skip to content

Commit

Permalink
Don't crash if sysctl.conf has no options for parsing
Browse files Browse the repository at this point in the history
This fixes the broken Codeberg CI.
  • Loading branch information
a13xp0p0v committed Oct 21, 2024
1 parent 77e6cdf commit e4896e0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion kernel_hardening_checker/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4896e0

Please sign in to comment.