diff --git a/materials.py b/materials.py index 81fcc74..2d9965c 100644 --- a/materials.py +++ b/materials.py @@ -31,6 +31,7 @@ class Block(object): return str(self) def __cmp__(self, other): + if not isinstance(other, Block): return False key = lambda a:a and (a.ID, a.blockData) return cmp( key(self), key(other))