summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorKaren Tracey <kmtracey@gmail.com>2010-03-20 20:31:57 +0000
committerKaren Tracey <kmtracey@gmail.com>2010-03-20 20:31:57 +0000
commitdf010f0a1f4cbbde1f60329201217d49ff5e43c2 (patch)
treef291dee45812abcbb3cacb1c9046879a7174bad3 /django
parentd5336b221c4aa086d011603375306a37edd4a8ac (diff)
[1.1.X] Fixed #12554: Silence exceptions that have specified silent_variable_failure=True. Thanks Thomas Steinacher, copelco, mlavin.
r12823 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/template/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/django/template/__init__.py b/django/template/__init__.py
index e407305ded..b33ec0a0a8 100644
--- a/django/template/__init__.py
+++ b/django/template/__init__.py
@@ -735,11 +735,11 @@ class Variable(object):
TypeError, # unsubscriptable object
):
raise VariableDoesNotExist("Failed lookup for key [%s] in %r", (bit, current)) # missing attribute
- except Exception, e:
- if getattr(e, 'silent_variable_failure', False):
- current = settings.TEMPLATE_STRING_IF_INVALID
- else:
- raise
+ except Exception, e:
+ if getattr(e, 'silent_variable_failure', False):
+ current = settings.TEMPLATE_STRING_IF_INVALID
+ else:
+ raise
return current