def close(self):
        """Close the i2c-dev I2C device.

        Raises:
            I2CError: if an I/O or OS error occurs.

        """
        if self._fd is None:
            return

        try:
            os.close(self._fd)
        except __HOLE__ as e:
            raise I2CError(e.errno, "Closing I2C device: " + e.strerror)

        self._fd = None

    # Immutable properties
dataset/ETHPy150Open vsergeev/python-periphery/periphery/i2c.py/I2C.close