'empty {} check'.format(self.__class__.__name__)
assert(len(self.opts) != 1), \
'useless {} check: {}'.format(self.__class__.__name__, opts)
'empty {} check'.format(self.__class__.__name__)
assert(len(self.opts) != 1), \
'useless {} check: {}'.format(self.__class__.__name__, opts)
- assert(isinstance(opts[0], KconfigCheck) or isinstance(opts[0], CmdlineCheck)), \
+ assert(isinstance(opts[0], (KconfigCheck, CmdlineCheck))), \
if data_type in ('kconfig', 'cmdline'):
opt.state = data.get(opt.name, None)
if data_type in ('kconfig', 'cmdline'):
opt.state = data.get(opt.name, None)
- if opt.type not in ('kconfig', 'cmdline'):
- sys.exit('[!] ERROR: bad type "{}" for a simple check {}'.format(opt.type, opt.name))
+ assert(opt.type in ('kconfig', 'cmdline')), \
+ 'bad type "{}" for a simple check'.format(opt.type)