#!/usr/bin/env python
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>).
+# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
-from contextlib import contextmanager
-from openerp.modules.registry import RegistryManager
KEY_LENGTH = 16
'timezone': 'http://axschema.org/pref/timezone',
}
-
-@contextmanager
-def cursor(db):
- cr = RegistryManager.get(db).db.cursor()
- try:
- yield cr
- finally:
- cr.close()
-
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: