Improve error reporting for BIMTester auditing lists

This commit is contained in:
Dion Moult
2020-08-21 19:52:50 +10:00
parent ff5bc25228
commit afd6811c08
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ def assert_attribute(element, name, value=None):
if value == 'NULL':
value = None
actual_value = getattr(element, name)
if isinstance(value, list):
if isinstance(value, list) and actual_value:
actual_value = list(actual_value)
assert actual_value == value, 'We expected a value of "{}" but instead got "{}" for the element {}'.format(value, actual_value, element)
@@ -1712,7 +1712,7 @@ class SelectFeaturesDir(bpy.types.Operator):
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
def execute(self, context):
bpy.context.scene.BIMProperties.features_dir = os.path.dirname(os.path.abspath(self.filepath))
bpy.context.scene.BIMProperties.features_dir = os.path.dirname(os.path.abspath(self.filepath)) if '.' in self.filepath else self.filepath
return {'FINISHED'}
def invoke(self, context, event):