summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-08-19 15:59:10 +0200
committerChristophe Simonis <chs@odoo.com>2016-08-19 15:59:10 +0200
commitee846fbff830f2c0ca125e04457033b69258c092 (patch)
tree04b2c21ebdd4ce16b147af467905f78a1c69a2ba
parent08ed48e24c69d9873137143cf2484cb706d17199 (diff)
[FIX] core: exception are made to be raised
-rw-r--r--openerp/http.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openerp/http.py b/openerp/http.py
index 5b85c07efff..994a396ffa7 100644
--- a/openerp/http.py
+++ b/openerp/http.py
@@ -211,7 +211,7 @@ class WebRequest(object):
to a database.
"""
if not self.db:
- return RuntimeError('request not bound to a database')
+ raise RuntimeError('request not bound to a database')
return openerp.api.Environment(self.cr, self.uid, self.context)
@lazy_property
@@ -247,7 +247,7 @@ class WebRequest(object):
# can not be a lazy_property because manual rollback in _call_function
# if already set (?)
if not self.db:
- return RuntimeError('request not bound to a database')
+ raise RuntimeError('request not bound to a database')
if not self._cr:
self._cr = self.registry.cursor()
return self._cr