mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1547730 - Define __hash__ for SandboxDependsFunction and CombinedDependsFunction so we can reference it as a dictionary key in py3 r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28111 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
c729f820ed
commit
b9d47b38ce
@ -78,6 +78,9 @@ class SandboxDependsFunction(object):
|
||||
def __eq__(self, other):
|
||||
raise ConfigureError('Cannot compare @depends functions.')
|
||||
|
||||
def __hash__(self):
|
||||
return object.__hash__(self)
|
||||
|
||||
def __ne__(self, other):
|
||||
raise ConfigureError('Cannot compare @depends functions.')
|
||||
|
||||
@ -232,6 +235,9 @@ class CombinedDependsFunction(DependsFunction):
|
||||
self._func is other._func and
|
||||
set(self.dependencies) == set(other.dependencies))
|
||||
|
||||
def __hash__(self):
|
||||
return object.__hash__(self)
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self == other
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user