Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/bup/vfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down