I have a fix for this problem. The patch is attached (again against the
1.0 branch).
I think that the check for the IdentityException was in the wrong place.
I've added a new one, but not removed the old, since I'm not sure what
else it might catch. Someone who understands how this all works should
have a careful look at this before it gets applied!
--
Peter S Russell <[EMAIL PROTECTED]>
Qustom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---
Index: turbogears/identity/conditions.py
===================================================================
--- turbogears/identity/conditions.py (revision 1932)
+++ turbogears/identity/conditions.py (working copy)
@@ -272,7 +272,13 @@
def _wrapper( *args, **kw ):
errors= []
if predicate.eval_with_object( current, errors ):
- return fn( *args, **kw )
+ try:
+ result = fn( *args, **kw )
+ except IdentityException, e:
+ errors = [str(e)]
+ raise IdentityFailure ( errors )
+ else:
+ return result
else:
raise IdentityFailure( errors )
_wrapper.exposed= True