Diff struct comparison, can be a list

This commit is contained in:
Doug Blank 2015-05-22 14:25:40 -04:00
parent e554e324af
commit b8ffc8a77d

View File

@ -390,6 +390,12 @@ class Struct(object):
def __eq__(self, other):
if isinstance(other, Struct):
return self.struct == other.struct
elif isinstance(self.struct, list):
## FIXME: self.struct can be a dict, list, etc
for item in self.struct:
if item == other:
return True
return False
else:
return self.struct == other