[FIX] error when getting zip module names
lp bug: https://launchpad.net/bugs/299925 fixed bzr revid: christophe@tinyerp.com-20081120121243-z94tvq1gztg5xkmr
This commit is contained in:
parent
ed2d3d58a3
commit
66f62129d6
|
@ -152,12 +152,15 @@ def get_module_resource(module, *args):
|
|||
def get_modules():
|
||||
"""Returns the list of module names
|
||||
"""
|
||||
def listdir(dir):
|
||||
def clean(name):
|
||||
name = os.path.basename(name)
|
||||
if name[-4:] == '.zip':
|
||||
name = name[:-4]
|
||||
return name
|
||||
return map(clean, os.listdir(dir))
|
||||
|
||||
module_list = os.listdir(ad)
|
||||
module_names = [os.path.basename(m) for m in module_list]
|
||||
module_list += [m for m in os.listdir(_ad) if m not in module_names]
|
||||
|
||||
return module_list
|
||||
return list(set(listdir(ad) + listdir(_ad)))
|
||||
|
||||
def create_graph(module_list, force=None):
|
||||
if not force:
|
||||
|
@ -166,8 +169,6 @@ def create_graph(module_list, force=None):
|
|||
packages = []
|
||||
|
||||
for module in module_list:
|
||||
if module[-4:]=='.zip':
|
||||
module = module[:-4]
|
||||
try:
|
||||
mod_path = get_module_path(module)
|
||||
if not mod_path:
|
||||
|
|
Loading…
Reference in New Issue