Commit 06f168ce authored by Yoshinori Okuji's avatar Yoshinori Okuji

Ignore exceptions.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1492 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c88857f8
......@@ -18,11 +18,17 @@ def getModuleItemList(user=None):
translate = context.translation_service.translate
item_list = []
try:
for module in context.getPortalObject().objectValues('ERP5 Folder'):
try:
url = module.absolute_url()
label = module.getTitle() or module.getId()
label = translate('ui', label)
item_list.append((url, label))
except:
pass
except:
pass
def compareModules(a, b): return cmp(a[1], b[1])
item_list.sort(compareModules)
......@@ -30,4 +36,3 @@ def getModuleItemList(user=None):
getModuleItemList = CachingMethod(getModuleItemList, id='ERP5Site_getModuleItemList')
return getModuleItemList(user=user)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment