Commits

David Jean Louis  committed d0a49dc

Removed try/except blocks in functions that retrieve custom dashboards and menus, they just make debug painful.

  • Participants
  • Parent commits 3ea7a61

Comments (0)

Files changed (2)

File admin_tools/dashboard/utils.py

         return get_app_index_dashboard(context)
     raise ValueError('Invalid dashboard location: "%s"' % location)
 
+
 def get_index_dashboard(context):
     """
     Returns the admin dashboard defined by the user or the default one.
         'ADMIN_TOOLS_INDEX_DASHBOARD',
         'admin_tools.dashboard.DefaultIndexDashboard'
     )
-    try:
-        mod, inst = dashboard_cls.rsplit('.', 1)
-        mod = import_module(mod)
-    except:
-        raise ImproperlyConfigured((
-            'The class pointed by your ADMIN_TOOLS_INDEX_DASHBOARD '
-            'setting variable cannot be imported'
-        ))
+    mod, inst = dashboard_cls.rsplit('.', 1)
+    mod = import_module(mod)
     return getattr(mod, inst)()
 
 
         'ADMIN_TOOLS_APP_INDEX_DASHBOARD',
         'admin_tools.dashboard.DefaultAppIndexDashboard'
     )
-    try:
-        mod, inst = dashboard_cls.rsplit('.', 1)
-        mod = import_module(mod)
-    except:
-        raise ImproperlyConfigured((
-            'The class pointed by your ADMIN_TOOLS_APP_INDEX_DASHBOARD '
-            'setting variable cannot be imported'
-        ))
+    mod, inst = dashboard_cls.rsplit('.', 1)
+    mod = import_module(mod)
     return getattr(mod, inst)(app_title, model_list)

File admin_tools/menu/utils.py

         'ADMIN_TOOLS_MENU',
         'admin_tools.menu.DefaultMenu'
     )
-    try:
-        mod, inst = menu_cls.rsplit('.', 1)
-        mod = import_module(mod)
-    except Exception, exc:
-        raise ImproperlyConfigured((
-            'The class pointed by your ADMIN_TOOLS_MENU setting variable '
-            'cannot be imported: %s' % exc.message
-        ))
+    mod, inst = menu_cls.rsplit('.', 1)
+    mod = import_module(mod)
     return getattr(mod, inst)()