Commit b1caec97 authored by Michael Büsch's avatar Michael Büsch

sources: Add == and != operator support

Signed-off-by: Michael Büsch's avatarMichael Buesch <>
parent a4d28841
......@@ -129,6 +129,12 @@ class GenericSource(object):
(cls.SRCTYPE, name))
return cls(name, None, data)
def __eq__(self, other):
return self.identHash == other.identHash
def __ne__(self, other):
return not self.__eq__(other)
def __repr__(self):
return "%s%s %s %s" % ("" if self.isFileBacked() else "project ",
self.SRCTYPE,, self.identHashStr)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment