Tweaked the decode() templatetag code slightly.
- Legacy-Id: 18482
This commit is contained in:
parent
638797cb65
commit
60a1e0fe3d
|
@ -6,7 +6,7 @@ import re
|
|||
from django import template
|
||||
from django.conf import settings
|
||||
from django.template.defaultfilters import linebreaksbr, force_escape
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.encoding import force_text, DjangoUnicodeDecodeError
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
import debug # pyflakes:ignore
|
||||
|
@ -69,7 +69,7 @@ def decrypt(string, request, year, plain=False):
|
|||
encrypted_file.name), key)
|
||||
try:
|
||||
out = force_text(out)
|
||||
except Exception:
|
||||
except DjangoUnicodeDecodeError:
|
||||
pass
|
||||
if code != 0:
|
||||
log("openssl error: %s:\n Error %s: %s" %(command, code, error))
|
||||
|
|
Loading…
Reference in a new issue