def raise_if_problem(self):
        """
        Raise an exception from the OpenSSL error queue or that was previously
        captured whe running a callback.
        """
        if self._problems:
            try:
                _raise_current_error()
            except Error:
                pass
            raise self._problems.pop(0)

        Raise an exception from the OpenSSL error queue or that was previously
        captured whe running a callback.
        
stackoverflow/venv/lib/python3.6/site-packages/OpenSSL/SSL.py