Skip to content

Commit 849a3dc

Browse files
committed
Added another exception class to a catch instance in a function, triggered by a new usage case.
- Legacy-Id: 15990
1 parent f6461d5 commit 849a3dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/utils/text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def isascii(text):
124124
try:
125125
text.encode('ascii')
126126
return True
127-
except UnicodeEncodeError:
127+
except (UnicodeEncodeError, UnicodeDecodeError):
128128
return False
129129

130130
def maybe_split(text, split=True, pos=5000):

0 commit comments

Comments
 (0)