diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2010-03-20 20:27:57 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2010-03-20 20:27:57 +0000 |
| commit | 2403f581b3cd0e7528f4b60c712f460fed91e2c2 (patch) | |
| tree | 5e90e035011256de0b74843f04f83c137269b8b5 /django/template/__init__.py | |
| parent | 10884ec2ebee152350c661c1356519ecd21084a5 (diff) | |
Fixed #12554: Silence exceptions that have specified silent_variable_failure=True. Thanks Thomas Steinacher, copelco, mlavin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/template/__init__.py')
| -rw-r--r-- | django/template/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/django/template/__init__.py b/django/template/__init__.py index 5d238d427c..eee0808b5d 100644 --- a/django/template/__init__.py +++ b/django/template/__init__.py @@ -745,11 +745,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 |
