diff --git a/lib/cdist/core/type.py b/lib/cdist/core/type.py index e9cb375a..20365b8d 100644 --- a/lib/cdist/core/type.py +++ b/lib/cdist/core/type.py @@ -86,6 +86,12 @@ class Type(object): def __repr__(self): return '' % self.name + def __eq__(self, other): + return isinstance(other, self.__class__) and self.name == other.name + + def __lt__(self, other): + return isinstance(other, self.__class__) and self.name < other.name + @property def is_singleton(self): """Check whether a type is a singleton."""