Change filter with lambda to list comprehension
It is more readable and returns a list therefore it is compatible both with Python 2 and 3. Signed-off-by: Łukasz Żarnowiecki <dolohow@outlook.com> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
		 Łukasz Żarnowiecki
					Łukasz Żarnowiecki
				
			
				
					committed by
					
						 Nicolas Sebrecht
						Nicolas Sebrecht
					
				
			
			
				
	
			
			
			 Nicolas Sebrecht
						Nicolas Sebrecht
					
				
			
						parent
						
							068ac7c410
						
					
				
				
					commit
					19c43308b9
				
			| @@ -131,9 +131,7 @@ class OLITestLib(): | ||||
|         else: | ||||
|             sections = [r for r in config.sections() \ | ||||
|                             if r.startswith('Repository')] | ||||
|             sections = filter(lambda s: \ | ||||
|                                   config.get(s, 'Type').lower() == 'imap', | ||||
|                               sections) | ||||
|             sections = [s for s in sections if config.get(s, 'Type').lower() == 'imap'] | ||||
|         for sec in sections: | ||||
|             # Connect to each IMAP repo and delete all folders | ||||
|             # matching the folderfilter setting. We only allow basic | ||||
|   | ||||
		Reference in New Issue
	
	Block a user