Bugfix for database checksum reconstruction with zero blocks.
authorMichael Vrable <vrable@cs.hmc.edu>
Mon, 21 Oct 2013 21:56:59 +0000 (14:56 -0700)
committerMichael Vrable <vrable@cs.hmc.edu>
Sun, 26 Jan 2014 23:45:38 +0000 (15:45 -0800)
python/cumulus/rebuild_database.py

index 39bf7c1..10a5f9a 100755 (executable)
@@ -301,6 +301,9 @@ class DatabaseRebuilder(object):
             buf = fp.read(length)
             verifier.update(buf)
 
+            # Zero blocks get no checksums, so skip further processing on them.
+            if object is None: continue
+
             if exact:
                 csum = cumulus.ChecksumCreator(CHECKSUM_ALGORITHM)
                 csum.update(buf)