Added another exception class to a catch instance in a function, triggered by a new usage case.

- Legacy-Id: 15990
This commit is contained in:
Henrik Levkowetz 2019-03-04 20:12:30 +00:00
parent f6461d531c
commit 849a3dcc97

View file

@ -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):