storage.exceptions: use value property to format all storage exceptions
aesteve-rh opened this issue · 0 comments
aesteve-rh commented
#218 introduces a value property that shadows the property from the base class in _HoldingLVMCommandError
:
@property
def value(self):
return ", ".join(f"{k}={v}" for k, v in self.__dict__.items() if v)
We can use a similar strategy for all storage errors (e.g., in StorageException
), and avoid formatting when the exception is constructed. This will give a more consistent look along all storage exceptions and will avoid discrepancies in the same exception when called from different places.