mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-03 23:41:21 +00:00 
			
		
		
		
	instrument: Fix active_channels for Python 3
Since we can iterate over the active_channel attribute of Instrument more than once, make sure to cast the return value of filter() to a list to avoid issues with python 3. Signed-off-by: Quentin Perret <quentin.perret@arm.com>
This commit is contained in:
		
				
					committed by
					
						
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							beb824256d
						
					
				
				
					commit
					b7ab340d33
				
			@@ -320,7 +320,7 @@ class Instrument(object):
 | 
			
		||||
 | 
			
		||||
            wanted = lambda ch: ((kinds is None or ch.kind in kinds) and
 | 
			
		||||
                                  (sites is None or ch.site in sites))
 | 
			
		||||
            self.active_channels = filter(wanted, self.channels.values())
 | 
			
		||||
            self.active_channels = list(filter(wanted, self.channels.values()))
 | 
			
		||||
 | 
			
		||||
    # instantaneous
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user