Launchpad automatic translations update.
[odoo/odoo.git] / addons / auth_openid / utils.py
index 444b5ee..806198f 100644 (file)
@@ -1,8 +1,8 @@
 #!/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
 
@@ -35,14 +33,4 @@ SREG2AX = {     # from http://www.axschema.org/types/#sreg
     '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: