Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions meshroom/core/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ def getDefaultValue(self):
return self._desc.value(self)
except Exception as e:
if not self.node.isCompatibilityNode:
# Log message only if we are not in compatibility mode
logging.warning("Failed to evaluate default value (node lambda) for attribute '{}': {}".
format(self.name, e))
logging.warning(f"Failed to evaluate 'defaultValue' (node lambda) for attribute '{self.fullName}': {e}")
return None
# Need to force a copy, for the case where the value is a list
# (avoid reference to the desc value)
Expand Down Expand Up @@ -284,7 +282,9 @@ def _isValid(self):
if callable(self._desc.validValue):
try:
return self._desc.validValue(self.node)
except Exception:
except Exception as e:
if not self.node.isCompatibilityNode:
logging.warning(f"Failed to evaluate 'isValid' (node lambda) for attribute '{self.fullName}': {e}")
return True
return True

Expand Down Expand Up @@ -345,8 +345,9 @@ def _getEnabled(self) -> bool:
if callable(self._desc.enabled):
try:
return self._desc.enabled(self.node)
except Exception:
# Node implementation may fail due to version mismatch
except Exception as e:
if not self.node.isCompatibilityNode:
logging.warning(f"Failed to evaluate 'enabled' (node lambda) for attribute '{self.fullName}': {e}")
return True
return self._desc.enabled

Expand Down
Loading