def __exit__(self, exc_type, exc_val, unused_exc_tb):
        if exc_type and exc_val:
            LOGGER.debug('Exiting due to exception: %r', exc_val)
            self._set_state(self.CLOSED)
            raise
        if self.open:
            self.close()
When leaving the context, examine why the context is leaving, if
dataset/ETHPy150Open gmr/rabbitpy/rabbitpy/channel.py/Channel.__exit__