[IMP] simplify set use (no need to convert a set into a set) and remove unused variable

bzr revid: xmo@openerp.com-20130723155902-pl0l4uti02zak35b
This commit is contained in:
Xavier Morel 2013-07-23 17:59:02 +02:00
parent d179a7f8ca
commit ed79dccf96
1 changed files with 3 additions and 3 deletions

View File

@ -1009,9 +1009,9 @@ class Root(object):
with registry.cursor() as cr:
m = registry.get('ir.module.module')
ids = m.search(cr, openerp.SUPERUSER_ID, [('state','=','installed')])
installed = set([x['name'] for x in m.read(cr, 1, ids, ['name'])])
modules_set = modules_set.intersection(set(installed))
modules = ["web"] + sorted(modules_set)
installed = set(x['name'] for x in m.read(cr, 1, ids, ['name']))
modules_set = modules_set & installed
# building all other methods
gen(["web"] + sorted(modules_set), False)