Exemple #1
0
    def configure(self):
        """server self configure when it is started"""
        register_openers()
        PluginManager.getManager().loadAllPlugins()
        confManager = ConfManager.getManager()
        proxy = confManager.getValue('common', 'network')

        if proxy['proxy'] != "" and proxy['proxy'] != None:
            param = {'http': 'http://%s' % proxy['proxy'], 'https': 'https://%s' % proxy['proxy'] }
            set_proxy(param)
            logging.debug('[%s]: set proxy server %s', self.getName(), proxy['proxy'])
    def configure(self):
        """server self configure when it is started"""
        register_openers()
        PluginManager.getManager().loadAllPlugins()
        confManager = ConfManager.getManager()
        proxy = confManager.getValue('common', 'network')

        if proxy['proxy'] != "" and proxy['proxy'] != None:
            param = {
                'http': 'http://%s' % proxy['proxy'],
                'https': 'https://%s' % proxy['proxy']
            }
            set_proxy(param)
            logging.debug('[%s]: set proxy server %s', self.getName(),
                          proxy['proxy'])
 def proxyHandler(self, param):
     """proxy handler for actors"""
     logging.debug('[%s]: proxyHandler with parm %s', self.getName(), param)
     res = E_PROXY_ERR
     res = set_proxy(param)
     return res, None
Exemple #4
0
 def proxyHandler(self, param):
     """proxy handler for actors"""
     logging.debug('[%s]: proxyHandler with parm %s', self.getName(), param);
     res = E_PROXY_ERR
     res = set_proxy(param)
     return res, None