'Add another blob to this image using its hash.
Once a blob is added that is smaller than the chunksize we finalize the
file, since handling adding more blobs makes the code much more complex.
Args:
blob_hash: sha256 binary digest
length: int length of blob
Raises:
IOError: if blob has been finalized.'

def AddBlob(self, blob_hash, length):

    if (self.finalized and (length > 0)):
        raise IOError("Can't    add    blobs    to    finalized    BlobImage")
    self.content_dirty = True
    self.index.seek(0, 2)
    self.index.write(blob_hash)
    self.size += length
    if (length < self.chunksize):
        self.finalized = True
