

def __init__(self, volume, cluster_size=None):
    super(NTFSFilesystem, self).__init__()
    self._volume = volume
    self._cluster_size = cluster_size
    e._vbr = NTFSVBR(self._volume)
    if (cluster_size is not None):
        self._cluster_size = cluster_size
    else:
        self._cluster_size = (self._vbr.bytes_per_sector() * self._vbr.sectors_per_cluster())
    self._clusters = ClusterAccessor(self._volume, self._cluster_size)
    self._logger = logging.getLogger('NTFSFilesystem')
    try:
        b = self.get_mft_buffer()
        _ = b[(- 1)]
    except OverrunBufferException as e:
        g_logger.warning('failed to read MFT from image, will fall back to MFTMirr: %s', e)
        try:
            b = self.get_mftmirr_buffer()
            _ = b[(- 1)]
        except OverrunBufferException as e:
            g_logger.error('failed to read MFTMirr from image: %s', e)
            raise CorruptNTFSFilesystemError('failed to read MFT or MFTMirr from image')
    if (len(b) > ((1024 * 1024) * 500)):
        self._mft_data = b
    else:
        self._mft_data = b[:]
    self._enumerator = MFTEnumerator(self._mft_data)
    try:
        _ = self.get_record(INODE_FIRST_USER)
    except OverrunBufferException:
        g_logger.error('overrun reading first user MFT record')
        raise CorruptNTFSFilesystemError('failed to read first user record (MFT not large enough)')

dataset/ETHPy150Open williballenthin/python-ntfs/ntfs/filesystem/__init__.py NTFSFilesystem.__init__/VarMisuse@39/52 `self`->`e`