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:
parent
f6461d531c
commit
849a3dcc97
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue