Commits

Mathiasdm  committed a595498

Use more detailed exception handling

  • Participants
  • Parent commits 1b475ec

Comments (0)

Files changed (1)

File breadcrumbs/templatetags/breadcrumbs_tags.py

 from django.template import loader, Node, Variable
 from django.utils.encoding import smart_str, smart_unicode
 from django.template.defaulttags import url
-from django.template import VariableDoesNotExist, loader, Context
+from django.template import VariableDoesNotExist, loader, Context, TemplateDoesNotExist
 
 logger = logging.getLogger(__name__)
 
     try:
         t = loader.get_template("breadcrumbs/breadcrumb.html")
         use_template = True
-    except:
+    except TemplateDoesNotExist:
         use_template = False
 
     if use_template: