зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
c729f820ed
Коммит
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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче