Commit 5145b22d authored by Filippos Giannakos's avatar Filippos Giannakos
Browse files

pithos: Add missing blocksize attribute to blocker.

Blocksize was undefined for the blocker that combines files and rados objecsts.
Define it, according to the block parameters.
parent 99b84de6
......@@ -62,6 +62,7 @@ class Blocker(object):
self.fblocker = FileBlocker(**params)
self.hashlen = self.fblocker.hashlen
self.blocksize = params['blocksize']
def block_hash(self, data):
"""Hash a block of data"""
......@@ -99,6 +100,7 @@ class Blocker(object):
and a data 'patch' applied at offset. Return:
(the hash of the new block, if the block already existed)
blocksize = self.blocksize
r_hash = None
r_existed = True
(f_hash, f_existed) = self.fblocker.block_delta(blkhash, offset, data)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment