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.
This commit is contained in:
Sybren A. Stüvel 2020-08-17 14:03:11 +02:00
parent 38752944f8
commit 4a2ff0fef8
1 changed files with 5 additions and 3 deletions

View File

@ -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)