Permalink
Browse files

ensure a tree is parsed before calculating its length

  • Loading branch information...
1 parent b3edb70 commit 3c9897789fe37433df8f0d3f78729a3cf9d4d138 @abderrahim abderrahim committed Jul 28, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 dulwich/objects.py
View
@@ -430,6 +430,7 @@ def __delitem__(self, name):
self._needs_serialization = True
def __len__(self):
+ self._ensure_parsed()
return len(self._entries)
def add(self, mode, name, hexsha):

0 comments on commit 3c98977

Please sign in to comment.