mirror of
				https://git.launchpad.net/ubuntu-dev-tools
				synced 2025-11-04 16:04:02 +00:00 
			
		
		
		
	Simplify arch-sorting key lambda
This commit is contained in:
		
							parent
							
								
									282aa33614
								
							
						
					
					
						commit
						cb64c34c22
					
				@ -67,7 +67,7 @@ class Control(object):
 | 
			
		||||
            if "Architecture" in paragraph:
 | 
			
		||||
                archs = set(paragraph["Architecture"].split())
 | 
			
		||||
                # Sort, with wildcard entries (such as linux-any) first:
 | 
			
		||||
                archs = sorted(archs, key=lambda x: (1 - int("any" in x), x))
 | 
			
		||||
                archs = sorted(archs, key=lambda x: ("any" not in x, x))
 | 
			
		||||
                paragraph["Architecture"] = " ".join(archs)
 | 
			
		||||
 | 
			
		||||
        if sort_paragraphs:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user