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 17513c3 commit 5c5e743
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion anyblok_pyramid/bloks/auth/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file,You can
# obtain one at http://mozilla.org/MPL/2.0/.
from anyblok.common import python_version

if python_version() >= (3, 5):
MainException = RecursionError
else:
MainException = RuntimeError

class RecursionRoleError(RecursionError):

class RecursionRoleError(MainException):
"""Simple exception to check if the roles is cyclic"""

0 comments on commit 5c5e743

Please sign in to comment.