Skip to content
Snippets Groups Projects
Commit cb5cba3d authored by Campbell Barton's avatar Campbell Barton
Browse files

Fix T70724: PLY import fails with strings

parent 4c07dedd
Branches
Tags
No related merge requests found
...@@ -64,7 +64,7 @@ class property_spec(object): ...@@ -64,7 +64,7 @@ class property_spec(object):
ans = [] ans = []
for i in range(count): for i in range(count):
s = stream[i] s = stream[i]
if len(s) < 2 or s[0] != '"' or s[-1] != '"': if not (len(s) >= 2 and s.startswith(b'"') and s.endswith(b'"')):
print('Invalid string', s) print('Invalid string', s)
print('Note: ply_import.py does not handle whitespace in strings') print('Note: ply_import.py does not handle whitespace in strings')
return None return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment