From 849a3dcc976efb1e745041d9c554a588bfab07dc Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 4 Mar 2019 20:12:30 +0000 Subject: [PATCH] Added another exception class to a catch instance in a function, triggered by a new usage case. - Legacy-Id: 15990 --- ietf/utils/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/utils/text.py b/ietf/utils/text.py index 5a1081f2e..30a38891d 100644 --- a/ietf/utils/text.py +++ b/ietf/utils/text.py @@ -124,7 +124,7 @@ def isascii(text): try: text.encode('ascii') return True - except UnicodeEncodeError: + except (UnicodeEncodeError, UnicodeDecodeError): return False def maybe_split(text, split=True, pos=5000):