From 276a54b0af93d1fdd45aeeb4e051b0d7704d560d Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 24 Nov 2010 17:40:41 +0100 Subject: [PATCH] [FIX] osv.osv: code cleanup after merging previous patches bzr revid: odo@openerp.com-20101124164041-760b4zoidv0omu6c --- bin/osv/osv.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bin/osv/osv.py b/bin/osv/osv.py index 6f43739b35a..e7b84351a23 100644 --- a/bin/osv/osv.py +++ b/bin/osv/osv.py @@ -62,18 +62,14 @@ class osv_pool(netsvc.Service): if not kwargs: if args and isinstance(args[-1], dict): ctx = args[-1] - else: - ctx = {} elif isinstance(kwargs, dict): ctx = kwargs.get('context', {}) - else: - ctx = {} uid = 1 if args and isinstance(args[0], (long, int)): uid = args[0] - lang = ctx and ctx.get('lang', False) + lang = ctx and ctx.get('lang') if not (lang or hasattr(src, '__call__')): return src @@ -105,7 +101,6 @@ class osv_pool(netsvc.Service): try: cr = pooler.get_db_only(dbname).cursor() - #return trans_obj._get_source( name=?) res = translate(cr, name=False, source_type=ttype, lang=lang, source=src) if res: