From de3905cd4b4e2b1df493e1bd859505932c5d2afb Mon Sep 17 00:00:00 2001 From: montiniz Date: Sat, 14 Mar 2015 18:17:10 -0500 Subject: [PATCH] Raise syntax no longer accepts comma-separated arguments in python3 --- djadmin2/types.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/djadmin2/types.py b/djadmin2/types.py index 79a18d7..7abd08f 100644 --- a/djadmin2/types.py +++ b/djadmin2/types.py @@ -224,7 +224,11 @@ class ModelAdmin2(with_metaclass(ModelAdminBase2)): 'Cannot instantiate admin view "{}.{}". ' 'The error that got raised was: {}'.format( self.__class__.__name__, admin_view.name, e)) - raise (new_exception, None, trace) + try: + raise new_exception.with_traceback(trace) + except AttributeError: + raise (new_exception, None, trace) + pattern_list.append( url( regex=admin_view.url,