X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=addons%2Fauth_openid%2Futils.py;h=806198f99c2b80a60a30952c28eb64dcd643a507;hb=117bf937b9b9489718a46ad5d6a967110ee5c3f7;hp=444b5eeaa05ad955676f09c0601bbb74d645d73f;hpb=779fa653c16e56612523eb25d0f6930e492e5ab5;p=odoo%2Fodoo.git diff --git a/addons/auth_openid/utils.py b/addons/auth_openid/utils.py index 444b5ee..806198f 100644 --- a/addons/auth_openid/utils.py +++ b/addons/auth_openid/utils.py @@ -1,8 +1,8 @@ #!/usr/bin/env python ############################################################################## -# +# # OpenERP, Open Source Management Solution -# Copyright (C) 2010-2011 OpenERP s.a. (). +# Copyright (C) 2010-2012 OpenERP s.a. (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -15,11 +15,9 @@ # 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 . +# along with this program. If not, see . # ############################################################################## -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: