-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Metadata API: ValueError in add/remove key in Root
Modify the exception thrown in Root.add_key() and Root.remove_key() to be "ValueError" instead of "KeyError". The reason for that change is that in my opinion the correct exception here should be ValueError as the problems are in the given values - role doesn't exist or key is not used by a particular role. Additionally, document the thrown exceptions in "Root.add_key" and add a test which invokes that exception. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
- Loading branch information
Showing
2 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters