Always initialize _sha.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 8 May 2009 18:08:30 +0000 (20:08 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 8 May 2009 18:08:30 +0000 (20:08 +0200)
dulwich/objects.py

index c0d1ff3bad7aff679a0074d9d8d01078e0f22080..2b1c568a6534619778dad2e7784fe4dd2c9b393a 100644 (file)
@@ -158,6 +158,7 @@ class ShaFile(object):
   
     def __init__(self):
         """Don't call this directly"""
+        self._sha = None
   
     def _parse_text(self):
         """For subclasses to do initialisation time parsing"""
@@ -386,6 +387,7 @@ class Tree(ShaFile):
     _num_type = 2
 
     def __init__(self):
+        super(Tree, self).__init__()
         self._entries = {}
         self._needs_parsing = False
         self._needs_serialization = True
@@ -475,6 +477,7 @@ class Commit(ShaFile):
     _num_type = 1
 
     def __init__(self):
+        super(Commit, self).__init__()
         self._parents = []
         self._needs_parsing = False
         self._needs_serialization = True