mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +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:
		@@ -2020,6 +2020,9 @@ class KernelConfig(object):
 | 
			
		||||
        # Expose the original text for backward compatibility
 | 
			
		||||
        self.text = text
 | 
			
		||||
 | 
			
		||||
    def __bool__(self):
 | 
			
		||||
        return bool(self.typed_config)
 | 
			
		||||
 | 
			
		||||
    not_set_regex = TypedKernelConfig.not_set_regex
 | 
			
		||||
 | 
			
		||||
    def iteritems(self):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user