From 181ed0afe87d7fbdd1c1c7decae124bc1c330c07 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 29 Jan 2013 16:05:56 +0100 Subject: [PATCH] Small adaptations due to changes in server bzr revid: nicolas.vanhoren@openerp.com-20130129150556-12w6iwvq0ucmzqsx --- addons/live_support/live_support.py | 2 ++ addons/web_im/im.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/live_support/live_support.py b/addons/live_support/live_support.py index 45de899ed49..21d6f5f6aba 100644 --- a/addons/live_support/live_support.py +++ b/addons/live_support/live_support.py @@ -18,3 +18,5 @@ # along with this program. If not, see . # ############################################################################## + +import openerp.addons.web_im.im as im \ No newline at end of file diff --git a/addons/web_im/im.py b/addons/web_im/im.py index e5f84bb2186..4eac3dd3a2e 100644 --- a/addons/web_im/im.py +++ b/addons/web_im/im.py @@ -90,7 +90,7 @@ POLL_TIMER = 30 DISCONNECTION_TIMER = POLL_TIMER + 5 WATCHER_ERROR_DELAY = 10 -if openerp.tools.config.options["gevent"]: +if openerp.evented: import gevent import gevent.event @@ -164,7 +164,7 @@ class ImportController(openerp.addons.web.http.Controller): @openerp.addons.web.http.jsonrequest def poll(self, req, last=None, users_watch=None, db=None, uid=None, password=None): - if not openerp.tools.config.options["gevent"]: + if not openerp.evented: raise Exception("Not usable in a server not running gevent") if db is not None: req.session._db = db @@ -182,7 +182,7 @@ class ImportController(openerp.addons.web.http.Controller): @openerp.addons.web.http.jsonrequest def activated(self, req): - return not not openerp.tools.config.options["gevent"] + return not not openerp.evented class im_message(osv.osv):