Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage.exceptions: use value property to format all storage exceptions #223

Open
aesteve-rh opened this issue Jun 1, 2022 · 0 comments
Labels

Comments

@aesteve-rh
Copy link
Member

#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant