def _checkServer(self, address, port):
        """
        *Check that the TCP Port we've decided to use for tunnelling is available*
        """
        # CREATE A TCP SOCKET
        import socket
        s = socket.socket()

        try:
            s.connect((address, port))
            return True
        except socket.error, e:
            self.log.warning(
                """Connection to `%(address)s` on port `%(port)s` failed - try again: %(e)s""" % locals())
            return False

        return None
def _checkServer ( self , address , port ) : import socket s = socket . socket ( ) try : s . connect ( ( address , port ) ) return True except socket . error , e : self . log . warning ( """Connection to `%(address)s` on port `%(port)s` failed - try again: %(e)s""" % locals ( ) ) return False return None
*Check that the TCP Port we've decided to use for tunnelling is available*