Fix display_type() issue for .write attribute in volshell, or other fuctions

Previously, `getattr(volobject, member)` in `display_type()` would incorrectly
retrieve method references (e.g., `.write`) instead of the intended object
addresses, causing an `AttributeError` when `_display_value()` attempted to
access `.vol.offset`.

This commit replaces `getattr(volobject, member)` with `volobject.member(member)`,
ensuring that the correct object address is retrieved instead of method references.

Fixes: #1705
This commit is contained in:
eve
2025-03-28 12:35:32 +00:00
parent 82e1813310
commit 2415e98510
+1 -1
View File
@@ -503,7 +503,7 @@ class Volshell(interfaces.plugins.PluginInterface):
if isinstance(volobject, interfaces.objects.ObjectInterface):
# We're an instance, so also display the data
try:
value = self._display_value(getattr(volobject, member))
value = self._display_value(volobject.member(member))
except exceptions.InvalidAddressException:
value = self._display_value(renderers.NotAvailableValue())
print(