def __set_proxy(self, config):
        """
        Set proxy if needed
        Args:
            config: Config dict
        """
        if "proxy" in config and config["proxy"]:
            proxy = config["proxy"]
            splitted = proxy.split(':')
            if len(splitted) != 2:
                raise ValueError(ONEVIEW_CLIENT_INVALID_PROXY)

            proxy_host = splitted[0]
            proxy_port = int(splitted[1])
            self.__connection.set_proxy(proxy_host, proxy_port)
def __set_proxy ( self , config ) : if "proxy" in config and config [ "proxy" ] : proxy = config [ "proxy" ] splitted = proxy . split ( ':' ) if len ( splitted ) != 2 : raise ValueError ( ONEVIEW_CLIENT_INVALID_PROXY ) proxy_host = splitted [ 0 ] proxy_port = int ( splitted [ 1 ] ) self . __connection . set_proxy ( proxy_host , proxy_port )
Set proxy if needed
        Args:
            config: Config dict