[FIX] oe: better filter of potential modules in addons paths.
bzr revid: vmt@openerp.com-20130507084941-afovplgo507holzl
This commit is contained in:
parent
7743760a4f
commit
e6a0631977
|
@ -42,6 +42,8 @@ def get_addons_from_paths(paths, exclude):
|
|||
if os.path.exists(p):
|
||||
names = list(set(os.listdir(p)))
|
||||
names = filter(lambda a: not (a.startswith('.') or a in exclude), names)
|
||||
names = filter(lambda a: os.path.isdir(os.path.join(p, a)), names)
|
||||
names = filter(lambda a: os.path.exists(os.path.join(p, a, '__openerp__.py')), names)
|
||||
module_names.extend(names)
|
||||
else:
|
||||
print "The addons path `%s` doesn't exist." % p
|
||||
|
|
Loading…
Reference in New Issue