From: Alexander Popov Date: Mon, 14 Feb 2022 21:19:42 +0000 (+0300) Subject: Improve 'type' for ComplexOptCheck and PresenceCheck classes X-Git-Tag: v0.5.17~30^2~1 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=b68df4d3611bc9f2a4c501191616c2b92f38c80c;p=kconfig-hardened-check.git Improve 'type' for ComplexOptCheck and PresenceCheck classes --- 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):