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:
Justin Wood 2019-05-28 14:28:30 +00:00
Родитель c729f820ed
Коммит b9d47b38ce
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -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