when comparing objects, define equality as 'attributes are the same'

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
remotes/origin/feature_files_export
Steven Armstrong 14 years ago
parent 0f413f8e4d
commit e27cd9e809
  1. 4
      lib/cdist/core/object.py

@ -80,6 +80,10 @@ class Object(object):
def __repr__(self):
return '<Object %s>' % self.name
def __eq__(self, other):
"""define equality as 'attributes are the same'"""
return self.__dict__ == other.__dict__
@property
def explorer_path(self):
# create absolute path

Loading…
Cancel
Save