Skip to content

Commit

Permalink
Fix RecursionError for python version < 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jssuzanne committed Feb 2, 2018
1 parent 5c5e743 commit 61e5c73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions anyblok_pyramid/bloks/auth/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from anyblok.column import String
from anyblok.relationship import Many2Many
from anyblok.field import Function
from .exceptions import RecursionRoleError
from .exceptions import RecursionRoleError, MainException


User = Declarations.Model.User
Expand Down Expand Up @@ -38,5 +38,5 @@ def get_all_roles_name(self):
def before_update_orm_event(cls, mapper, connection, target):
try:
target.get_all_roles_name()
except RecursionError:
except MainException:
raise RecursionRoleError()

0 comments on commit 61e5c73

Please sign in to comment.