[Erp5-report] r22250 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jul 3 15:09:49 CEST 2008
Author: jerome
Date: Thu Jul 3 15:09:48 2008
New Revision: 22250
URL: http://svn.erp5.org?rev=22250&view=rev
Log:
log error message when module.manage_permission fails
Modified:
erp5/trunk/products/ERP5/Document/BusinessTemplate.py
Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=22250&r1=22249&r2=22250&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py Thu Jul 3 15:09:48 2008
@@ -26,6 +26,7 @@
#
##############################################################################
+import sys
from Shared.DC.ZRDB.Connection import Connection as RDBConnection
from Globals import Persistent, PersistentMapping
from Acquisition import Implicit, aq_base
@@ -2662,13 +2663,15 @@
else:
module = portal.newContent(id=id, portal_type=str(mapping['portal_type']))
module.setTitle(str(mapping['title']))
- for name,role_list in list(mapping['permission_list']):
+ for name, role_list in list(mapping['permission_list']):
acquire = (type(role_list) == type([]))
try:
module.manage_permission(name, roles=role_list, acquire=acquire)
except ValueError:
# Ignore a permission not present in this system.
- pass
+ LOG('ERP5', PROBLEM,
+ 'Unable to update module permission "%s" with roles %s' % (
+ name, role_list), error=sys.exc_info())
def _importFile(self, file_name, file):
dict = {}
More information about the Erp5-report
mailing list