mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-06-27 04:30:22 -04:00
Remove obsolete UnicodeEncodeError handling
This commit is contained in:
parent
3f8ddc0de7
commit
1a33ef89c2
1 changed files with 2 additions and 5 deletions
|
@ -29,11 +29,8 @@ _NEWLINE_PATTERN = re.compile('[\n\r]')
|
||||||
|
|
||||||
|
|
||||||
def string_is_ascii(s):
|
def string_is_ascii(s):
|
||||||
try:
|
# This approach is better for compatibility
|
||||||
# This approach is better for compatibility
|
return all(ord(c) < 128 for c in s)
|
||||||
return all(ord(c) < 128 for c in s)
|
|
||||||
except UnicodeEncodeError:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def load_constants(filename):
|
def load_constants(filename):
|
||||||
"""Read in constants file, which must be output in every language."""
|
"""Read in constants file, which must be output in every language."""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue