From 5ac6e532bdfeef0f3bf8ad45ba8bc17183ff423c Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 23 Feb 2012 13:32:13 +0100 Subject: [PATCH] [FIX] if a connector was setup in the configuration object, don't re-set one instead bzr revid: xmo@openerp.com-20120223123213-aftgz7h0zxkbzsju --- addons/web/common/http.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/web/common/http.py b/addons/web/common/http.py index 26807f6..9294808 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -440,12 +440,12 @@ class Root(object): self.root = '/web/webclient/home' self.config = options - if self.config.backend == 'local': - conn = LocalConnector() - else: - conn = openerplib.get_connector(hostname=self.config.server_host, - port=self.config.server_port) - self.config.connector = conn + if not hasattr(self.config, 'connector'): + if self.config.backend == 'local': + self.config.connector = LocalConnector() + else: + self.config.connector = openerplib.get_connector( + hostname=self.config.server_host, port=self.config.server_port) self.session_cookie = 'sessionid' self.addons = {} -- 1.7.10.4