mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target/KernelConfig: Implement the __bool__
method
To aid in checking whether any information is contained in the `KernelConfig` ensure that that `__bool__` method value indicated the presence of parsed input.
This commit is contained in:
parent
f141899dae
commit
1325e59b1a
@ -2020,6 +2020,9 @@ class KernelConfig(object):
|
|||||||
# Expose the original text for backward compatibility
|
# Expose the original text for backward compatibility
|
||||||
self.text = text
|
self.text = text
|
||||||
|
|
||||||
|
def __bool__(self):
|
||||||
|
return bool(self.typed_config)
|
||||||
|
|
||||||
not_set_regex = TypedKernelConfig.not_set_regex
|
not_set_regex = TypedKernelConfig.not_set_regex
|
||||||
|
|
||||||
def iteritems(self):
|
def iteritems(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user