mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-06-12 12:51:48 -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):
|
||||
try:
|
||||
# This approach is better for compatibility
|
||||
return all(ord(c) < 128 for c in s)
|
||||
except UnicodeEncodeError:
|
||||
return False
|
||||
# This approach is better for compatibility
|
||||
return all(ord(c) < 128 for c in s)
|
||||
|
||||
def load_constants(filename):
|
||||
"""Read in constants file, which must be output in every language."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue