mirror of
				https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
				synced 2025-11-04 02:24:24 +00:00 
			
		
		
		
	Make hint comparison more intelligent
"easy foo/1 bar/2" and "easy bar/2 foo/1" are simply different ways of writing the same hint, so the corresponding Hint objects should compare as equal. Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
		
							parent
							
								
									0e3d363598
								
							
						
					
					
						commit
						84718b7083
					
				
							
								
								
									
										7
									
								
								hints.py
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								hints.py
									
									
									
									
									
								
							@ -77,7 +77,12 @@ class Hint(object):
 | 
			
		||||
        return self._hint
 | 
			
		||||
 | 
			
		||||
    def __eq__(self, other):
 | 
			
		||||
        return str(self) == str(other)
 | 
			
		||||
        if self.type != other.type:
 | 
			
		||||
            return False
 | 
			
		||||
        elif self.type == 'age-days' and self.days != other.days:
 | 
			
		||||
            return False
 | 
			
		||||
        else:
 | 
			
		||||
            return frozenset(self.packages) == frozenset(other.packages)
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def type(self):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user