Browse Source

Remove invalid exception catching

List operation of verifications will never raise VerificationNotFound
exception in _get_all method, we should remove it to normalize the
error code.

Change-Id: Ia1a6345b1e38b9ccc4246d2d39d11cc8e537cb4e
changes/80/693780/1
jiaopengju 1 year ago
parent
commit
28fabef6ec
1 changed files with 5 additions and 8 deletions
  1. +5
    -8
      karbor/api/v1/verifications.py

+ 5
- 8
karbor/api/v1/verifications.py View File

@ -142,14 +142,11 @@ class VerificationsController(wsgi.Controller):
CONF.query_verification_filters)
utils.check_filters(filters)
try:
verifications = self._get_all(context, marker, limit,
sort_keys=sort_keys,
sort_dirs=sort_dirs,
filters=filters,
offset=offset)
except exception.VerificationNotFound as error:
raise exc.HTTPNotFound(explanation=error.msg)
verifications = self._get_all(context, marker, limit,
sort_keys=sort_keys,
sort_dirs=sort_dirs,
filters=filters,
offset=offset)
retval_verifications = self._view_builder.detail_list(req,
verifications)


Loading…
Cancel
Save