[FIX] oe: listing of modules only take directories having a __openerp__.py file

bzr revid: chs@openerp.com-20131031152716-sda5397b4n0be1ih
This commit is contained in:
Christophe Simonis 2013-10-31 16:27:16 +01:00
parent 82211b1ac2
commit ab93864dfc
1 changed files with 1 additions and 2 deletions

View File

@ -40,8 +40,7 @@ def get_addons_from_paths(paths, exclude):
module_names = []
for p in paths:
if os.path.exists(p):
names = list(set(os.listdir(p)))
names = filter(lambda a: not (a.startswith('.') or a in exclude), names)
names = [n for n in os.listdir(p) if os.path.isfile(os.path.join(p, n, '__openerp__.py')) and not n.startswith('.') and n not in exclude]
module_names.extend(names)
else:
print "The addons path `%s` doesn't exist." % p