diff options
Diffstat (limited to 'odoo/sql_db.py')
| -rw-r--r-- | odoo/sql_db.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/odoo/sql_db.py b/odoo/sql_db.py index 516eb175633..298bc9f1975 100644 --- a/odoo/sql_db.py +++ b/odoo/sql_db.py @@ -86,10 +86,7 @@ sql_counter = 0 def check(f, self, *args, **kwargs): """ Wrap a cursor method that cannot be called when the cursor is closed. """ if self._closed: - msg = 'Unable to use a closed cursor.' - if self.__closer: - msg += ' It was closed at %s, line %s' % self.__closer - raise psycopg2.OperationalError(msg) + raise psycopg2.OperationalError('Unable to use a closed cursor.') return f(self, *args, **kwargs) @@ -248,7 +245,6 @@ class Cursor(BaseCursor): self.__caller = False self._closed = False # real initialisation value self.autocommit(False) - self.__closer = False self._default_log_exceptions = True @@ -362,9 +358,6 @@ class Cursor(BaseCursor): del self.cache - if self.sql_log: - self.__closer = frame_codeinfo(currentframe(), 3) - # simple query count is always computed sql_counter += self.sql_log_count |
