Commit: 4a2ff0fef89765f1e0f766b066e63a8988df5e98
Author: Sybren A. Stüvel
Date:   Mon Aug 17 14:03:11 2020 +0200
Branches: master
https://developer.blender.org/rB4a2ff0fef89765f1e0f766b066e63a8988df5e98

Tests: Better error reporting in `AbstractAlembicTest`

Instead of checking for the length of a list, just handle the error that
occurs when the length is incorrect.

No functional changes to any actual test.

===================================================================

M       tests/python/alembic_tests.py

===================================================================

diff --git a/tests/python/alembic_tests.py b/tests/python/alembic_tests.py
index c911634ba12..448048d0f17 100644
--- a/tests/python/alembic_tests.py
+++ b/tests/python/alembic_tests.py
@@ -104,9 +104,11 @@ class AbstractAlembicTest(AbstractBlenderRunnerTest):
             if proptype == 'CompoundProperty':
                 # To read those, call self.abcprop() on it.
                 continue
-            if len(parts) < 2:
-                raise ValueError('Error parsing result from abcprop: %s' % 
info.strip())
-            valtype_and_arrsize, name_and_extent = parts[1:]
+
+            try:
+                valtype_and_arrsize, name_and_extent = parts[1:]
+            except ValueError as ex:
+                raise ValueError('Error parsing result from abcprop 
"{info.strip()}": {ex}') from ex
 
             # Parse name and extent
             m = self.abcls_array.match(name_and_extent)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to