Commit 2476b3be authored by Julien Muchembled's avatar Julien Muchembled

Allow import of all exceptions defined in zExceptions

parent a1fa5881
......@@ -102,8 +102,6 @@ def initialize( context ):
# Allow some usefull classes and fonctions in TTW code
ModuleSecurityInfo('ZODB.POSException').declarePublic('ConflictError')
ModuleSecurityInfo('zExceptions').declarePublic('BadRequest', 'NotFound',
'Redirect', 'Unauthorized')
ModuleSecurityInfo('Products.CMFCore.WorkflowCore').declarePublic(
'WorkflowException')
ModuleSecurityInfo('Products.ERP5.Document.Image').declarePublic(
......
......@@ -190,3 +190,8 @@ ModuleSecurityInfo('Products.ERP5Type.Constraint').declarePublic('PropertyTypeVa
ModuleSecurityInfo('Products.ERP5Type.collections').declarePublic('OrderedDict')
ModuleSecurityInfo('Products.ERP5Type.DiffUtils').declarePublic('DiffFile')
ModuleSecurityInfo('pprint').declarePublic('pformat', 'pprint')
import zExceptions
ModuleSecurityInfo('zExceptions').declarePublic(*filter(
lambda x: Exception in getattr(getattr(zExceptions, x), '__mro__', ()),
dir(zExceptions)))
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