Commit e6846185 authored by Łukasz Nowak's avatar Łukasz Nowak

- do no trust called method, emit message in case of issue


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35461 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1433d455
...@@ -59,8 +59,11 @@ group_id_list_generator = getattr(context, \'ERP5Type_asSecurityGroupId\')\n ...@@ -59,8 +59,11 @@ group_id_list_generator = getattr(context, \'ERP5Type_asSecurityGroupId\')\n
\n \n
security_category_dict = {}\n security_category_dict = {}\n
for method_id, base_category_list in context.ERP5Type_getSecurityCategoryMapping():\n for method_id, base_category_list in context.ERP5Type_getSecurityCategoryMapping():\n
security_category_dict.setdefault(tuple(base_category_list), []).extend(\n try:\n
getattr(context, method_id)(base_category_list, login, context, \'\'))\n security_category_dict.setdefault(tuple(base_category_list), []).extend(\n
getattr(context, method_id)(base_category_list, login, context, \'\'))\n
except: # XXX: it is not possible to log message with traceback from python script\n
print \'It was not possible to invoke method %s with base_category_list %s\'%(method_id, base_category_list)\n
\n \n
for base_category_list, category_value_list in security_category_dict.items():\n for base_category_list, category_value_list in security_category_dict.items():\n
print \'base_category_list:\', base_category_list\n print \'base_category_list:\', base_category_list\n
......
98 99
\ No newline at end of file \ No newline at end of file
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