def __init__(self, config): """ Raises ServerException if there's a startup problem. """ self.config = config try: super().__init__( (config.options.listen_host, config.options.listen_port)) except socket.error as e: raise exceptions.ServerException('Error starting proxy server: ' + repr(e)) self.channel = None
def __init__(self, config): """ Raises ServerException if there's a startup problem. """ self.config = config try: super(ProxyServer, self).__init__((config.host, config.port)) except socket.error as e: six.reraise( exceptions.ServerException, exceptions.ServerException('Error starting proxy server: ' + repr(e)), sys.exc_info()[2]) self.channel = None