From 61e5c73bfd25550f4773e3fe606193effe2c8c53 Mon Sep 17 00:00:00 2001 From: jssuzanne Date: Fri, 2 Feb 2018 16:18:45 +0100 Subject: [PATCH] Fix RecursionError for python version < 3.5 --- anyblok_pyramid/bloks/auth/role.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anyblok_pyramid/bloks/auth/role.py b/anyblok_pyramid/bloks/auth/role.py index a20594e..f97a482 100644 --- a/anyblok_pyramid/bloks/auth/role.py +++ b/anyblok_pyramid/bloks/auth/role.py @@ -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 @@ -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()