'Saves the proxy information and creates the handler.
If the information is invalid it will set self._proxy_handler to None,
so no proxy is used.
:return: None'

def set_proxy(self, ip, port):

    om.out.debug(('Called    set_proxy(%s,    %s)' % (ip, port)))
    if (not ip):
        cfg.save('proxy_address', '')
        cfg.save('proxy_port', port)
        self._proxy_handler = None
        return
    if ((port > 65535) or (port < 1)):
        self._proxy_handler = None
        raise BaseFrameworkException(('Invalid    port    number:    ' + str(port)))
    cfg.save('proxy_address', ip)
    cfg.save('proxy_port', port)
    proxy_url = ('http://%s:%s' % (ip, port))
    proxy_map = {'http': proxy_url}
    self._proxy_handler = urllib2.ProxyHandler(proxy_map)
