-
Notifications
You must be signed in to change notification settings - Fork 204
resourceManager: use f-strings in exceptions #358
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
resourceManager: use f-strings in exceptions #358
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the first commit is fixing bad code that logged badly formatted error message. The rest of the commits are good but have bogus commit message.
2c2776f
to
5a2e282
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
/ost |
1 similar comment
/ost |
Fix ResourceAlreadyAcquired raise to use f-string instead of %-format. Also, the %-format is misued, with a comma in between where the '%' symbol should be, causing a bogus output. Before: vdsm.storage.resourceManager.ResourceAlreadyAcquired: ('%s is already acquired by %s', '00_storage.a2ad7a23-96c5-4c23-9007-c0d1892ea07d', 'fb7c6873-74b4-4895-876a-a52ab7bfa082') After: vdsm.storage.resourceManager.ResourceAlreadyAcquired: '00_storage.a2ad7a23-96c5-4c23-9007-c0d1892ea07d is already acquired by fb7c6873-74b4-4895-876a-a52ab7bfa082' Signed-off-by: Albert Esteve <aesteve@redhat.com>
Fix ResourceDoesNotExist to be constructed with an f-string instead of %-format. Signed-off-by: Albert Esteve <aesteve@redhat.com>
Fix NamespaceRegistered so that it is constructed with an fstring instead of %-format. Signed-off-by: Albert Esteve <aesteve@redhat.com>
Fix InvalidNamespace to be constructed with an fstring instead of %-format. Signed-off-by: Albert Esteve <aesteve@redhat.com>
Fix ValueError in resourceManager so that it is constructed with f-string instead of %-format. Signed-off-by: Albert Esteve <aesteve@redhat.com>
Fix KeyError in resourceManager module so that it is constructed with f-string instead of using %-format. Signed-off-by: Albert Esteve <aesteve@redhat.com>
Fix InvalidLockType so that it is constructed with f-string instead of %-format. Signed-off-by: Albert Esteve <aesteve@redhat.com>
Fix RequestTimedOutError so that it is constructed with fstring instead of %-format. Signed-off-by: Albert Esteve <aesteve@redhat.com>
5a2e282
to
161ae32
Compare
/ost |
Fix various exceptions in the resourceManager module, so that
it is constructed wiht f-string instead of %-format.
Fix
ResourceAlreadyAcquired
exception that isusing a comma to separate instead of
%
, resulting inbogus printed message.
Before:
After:
Signed-off-by: Albert Esteve aesteve@redhat.com