From cb5cba3da0b11eff19780fc314e1465be398ec36 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 11 Oct 2019 16:25:22 +1100 Subject: Fix T70724: PLY import fails with strings --- io_mesh_ply/import_ply.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py index d0deee0a..5da7f9d6 100644 --- a/io_mesh_ply/import_ply.py +++ b/io_mesh_ply/import_ply.py @@ -64,7 +64,7 @@ class property_spec(object): ans = [] for i in range(count): 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('Note: ply_import.py does not handle whitespace in strings') return None -- cgit v1.2.3