def _bootstrapSPIDev(self):
        import os.path
        import sys
        if self.use_py_spi:
            try:
                import spidev
            except:
                error = "Unable to import spidev. Please install. pip install spidev"
                log.error(error)
                raise ImportError(error)

        if not os.path.exists(self.dev):
            error = "Cannot find SPI device. Please see https://github.com/maniacallabs/bibliopixel/wiki/SPI-Setup for details."
            log.error(error)
            raise IOError(error)

        # permissions check
        try:
            open(self.dev)
        except __HOLE__ as e:
            if e.errno == 13:
                error = "Cannot find SPI device. Please see https://github.com/maniacallabs/bibliopixel/wiki/SPI-Setup for details."
                log.error(error)
                raise IOError(error)
            else:
                raise e
dataset/ETHPy150Open ManiacalLabs/BiblioPixel/bibliopixel/drivers/spi_driver_base.py/DriverSPIBase._bootstrapSPIDev