(Bug pointed out by Mark_B.)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
self._data_length = total_size - self.DATA_OFFSET - (num_leases * self.LEASE_SIZE)
if self._data_length < 0:
- raise CorruptStoredShareError("calculated data length for shnum %d is %d" % (shnum, self._data_length))
+ raise CorruptStoredShareError(shnum, "calculated data length for shnum %d is %d" % (shnum, self._data_length))
# Boilerplate is in CloudShareBase, read implementation is in CloudShareReaderMixin.
# So nothing to implement here. Yay!
self._data_length = filesize - self.DATA_OFFSET - (num_leases * self.LEASE_SIZE)
if self._data_length < 0:
- raise CorruptStoredShareError("calculated data length for shnum %d is %d" % (shnum, self._data_length))
+ raise CorruptStoredShareError(shnum, "calculated data length for shnum %d is %d" % (shnum, self._data_length))
def __repr__(self):
return ("<ImmutableDiskShare %s:%r at %r>"