mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00:00 
			
		
		
		
	trace: dmesg: Ignore empty lines
dmesg output seems to sometimes include an empty line. Ignore them, so we don't fail to match with the regexes.
This commit is contained in:
		
				
					committed by
					
						
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							c944d34593
						
					
				
				
					commit
					d9d187471f
				
			@@ -166,6 +166,7 @@ class DmesgCollector(TraceCollector):
 | 
				
			|||||||
            return [
 | 
					            return [
 | 
				
			||||||
                KernelLogEntry.from_str(line)
 | 
					                KernelLogEntry.from_str(line)
 | 
				
			||||||
                for line in dmesg_out.splitlines()
 | 
					                for line in dmesg_out.splitlines()
 | 
				
			||||||
 | 
					                if line.strip()
 | 
				
			||||||
            ]
 | 
					            ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def reset(self):
 | 
					    def reset(self):
 | 
				
			||||||
@@ -195,4 +196,3 @@ class DmesgCollector(TraceCollector):
 | 
				
			|||||||
    def get_trace(self, outfile):
 | 
					    def get_trace(self, outfile):
 | 
				
			||||||
        with open(outfile, 'wt') as f:
 | 
					        with open(outfile, 'wt') as f:
 | 
				
			||||||
            f.write(self.dmesg_out + '\n')
 | 
					            f.write(self.dmesg_out + '\n')
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user