def TSKVolumeGetBytesPerSector(tsk_volume):
  # Note that because pytsk3.Volume_Info does not explicitly defines info
  # we need to check if the attribute exists and has a value other
  # than None. Default to 512 otherwise.
  if hasattr(tsk_volume, u'info') and tsk_volume.info is not None:
    block_size = getattr(tsk_volume.info, u'block_size', 512)
  else:
    block_size = 512

  return block_size
Retrieves the number of bytes per sector from a TSK volume object.
dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/lib/tsk_partition.py/TSKVolumeGetBytesPerSector