[IMP] Load the real modules

bzr revid: stephane@tinyerp.com-20081215122958-z9i0mdeydr7wuuh7
This commit is contained in:
Stephane Wirtel 2008-12-15 13:29:58 +01:00
parent 73736db39d
commit 8855ece8fd
1 changed files with 5 additions and 1 deletions

View File

@ -191,7 +191,11 @@ def get_modules():
if name[-4:] == '.zip':
name = name[:-4]
return name
return map(clean, os.listdir(dir))
def is_really_module(name):
name = opj(dir, name)
return os.path.isdir(name) or zipfile.is_zipfile(name)
return map(clean, filter(is_really_module, os.listdir(dir)))
return list(set(listdir(ad) + listdir(_ad)))