Skip to content

Commit 60a1e0f

Browse files
committed
Tweaked the decode() templatetag code slightly.
- Legacy-Id: 18482
1 parent 638797c commit 60a1e0f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/nomcom/templatetags/nomcom_tags.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from django import template
77
from django.conf import settings
88
from django.template.defaultfilters import linebreaksbr, force_escape
9-
from django.utils.encoding import force_text
9+
from django.utils.encoding import force_text, DjangoUnicodeDecodeError
1010
from django.utils.safestring import mark_safe
1111

1212
import debug # pyflakes:ignore
@@ -69,7 +69,7 @@ def decrypt(string, request, year, plain=False):
6969
encrypted_file.name), key)
7070
try:
7171
out = force_text(out)
72-
except Exception:
72+
except DjangoUnicodeDecodeError:
7373
pass
7474
if code != 0:
7575
log("openssl error: %s:\n Error %s: %s" %(command, code, error))

0 commit comments

Comments
 (0)