summaryrefslogtreecommitdiff
path: root/openerp/sql_db.py
diff options
context:
space:
mode:
Diffstat (limited to 'openerp/sql_db.py')
-rw-r--r--openerp/sql_db.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/openerp/sql_db.py b/openerp/sql_db.py
index c04d1a17759..5deb9227956 100644
--- a/openerp/sql_db.py
+++ b/openerp/sql_db.py
@@ -402,6 +402,12 @@ class Cursor(object):
def __getattr__(self, name):
return getattr(self._obj, name)
+ @property
+ def closed(self):
+ # NOTE: we cannot use `__getattr__` delegation as we
+ # should not `check` that the cursor is closed
+ return self._obj.closed
+
class TestCursor(Cursor):
""" A cursor to be used for tests. It keeps the transaction open across
several requests, and simulates committing, rolling back, and closing.