Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Implement Tree.__len__.

  • Loading branch information...
commit 6044fe5f254819a8599d9584f2fcad4b11b9c6b1 1 parent 8a15645
@jelmer jelmer authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  dulwich/objects.py
View
3  dulwich/objects.py
@@ -428,6 +428,9 @@ def __delitem__(self, name):
del self._entries[name]
self._needs_serialization = True
+ def __len__(self):
+ return len(self._entries)
+
def add(self, mode, name, hexsha):
assert type(mode) == int
assert type(name) == str
Please sign in to comment.
Something went wrong with that request. Please try again.