diff --git a/lib/bup/vfs.py b/lib/bup/vfs.py index 454355337..31327c57d 100644 --- a/lib/bup/vfs.py +++ b/lib/bup/vfs.py @@ -175,6 +175,14 @@ def __init__(self, parent, name, mode, hash): def __cmp__(a, b): return cmp(a and a.name or None, b and b.name or None) + def __eq__(self, other): + if hasattr(other, 'hash'): + return self.hash == other.hash + return self.hash == other + + def __ne__(self, other): + return not self.__eq__(other) + def __iter__(self): return iter(self.subs())