Merge "Pass kwargs to exception to get better format of error message"

This commit is contained in:
Zuul 2019-04-27 23:11:40 +00:00 committed by Gerrit Code Review
commit 26911744c0
2 changed files with 2 additions and 2 deletions

View File

@ -456,7 +456,7 @@ def check_endpoint_url(url):
try:
url.replace('$(', '%(') % substitutions
except (KeyError, TypeError, ValueError):
raise exception.URLValidationError(url)
raise exception.URLValidationError(url=url)
def create_directory(directory, keystone_user_id=None, keystone_group_id=None):

View File

@ -1016,7 +1016,7 @@ class Manager(manager.Manager):
try:
filter_['comparator'] = operators[op]
except KeyError:
raise exception.InvalidOperatorError(op)
raise exception.InvalidOperatorError(_op=op)
return hints
def _handle_shadow_and_local_users(self, driver, hints):