From b68df4d3611bc9f2a4c501191616c2b92f38c80c Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Tue, 15 Feb 2022 00:19:42 +0300 Subject: [PATCH] Improve 'type' for ComplexOptCheck and PresenceCheck classes --- kconfig_hardened_check/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index 5092742..7db4f5d 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -159,7 +159,7 @@ class PresenceCheck: if self.type == 'kconfig': self.name = 'CONFIG_' + name else: - self.name = name + sys.exit('[!] ERROR: unsupported type "{}" for {}'.format(type, self.__class__.__name__)) self.state = None self.result = None @@ -193,7 +193,7 @@ class ComplexOptCheck: @property def type(self): - return self.opts[0].type + return 'complex' @property def expected(self): -- 2.31.1