Remove unused import, always ensure that objects is serialized before running check().
authorJelmer Vernooij <jelmer@samba.org>
Thu, 8 Apr 2010 01:02:15 +0000 (03:02 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 8 Apr 2010 01:02:15 +0000 (03:02 +0200)
dulwich/objects.py
dulwich/tests/test_objects.py

index 096a9c04372ae9ac6925df8a4c25c1b0b9a51a2c..41b49056e7b81cafdbb11d0fedb0132283729d50 100644 (file)
@@ -28,7 +28,6 @@ from cStringIO import (
 import mmap
 import os
 import stat
-import time
 import zlib
 
 from dulwich.errors import (
@@ -294,7 +293,7 @@ class ShaFile(object):
         # check() method during optimization so we can still check the object
         # when necessary.
         try:
-            self._deserialize(self._chunked_text)
+            self._deserialize(self.as_raw_chunks())
         except Exception, e:
             raise ObjectFormatException(e)
 
index c117edfa533ce5a01c5096c6b3acd2d30bc166d6..feb21ce7f973459ee2ebe248a38f70866b3f670c 100644 (file)
@@ -477,6 +477,7 @@ class TagParseTests(ShaFileCheckTests):
 
 
 class CheckTests(unittest.TestCase):
+
     def test_check_hexsha(self):
         check_hexsha(a_sha, "failed to check good sha")
         self.assertRaises(ObjectFormatException, check_hexsha, '1' * 39,