remove dead code
because the key ID validation is now centralized, by the time this code would have been reached, we know that the key ID exists, so a KeyError will never be thrown
This commit is contained in:
parent
24832982d4
commit
4f34af95bc
@ -152,13 +152,10 @@ class KmsResponse(BaseResponse):
|
||||
|
||||
self._validate_key_id(key_id)
|
||||
|
||||
try:
|
||||
key = self.kms_backend.describe_key(
|
||||
self.kms_backend.get_key_id(key_id))
|
||||
except KeyError:
|
||||
headers = dict(self.headers)
|
||||
headers['status'] = 404
|
||||
return "{}", headers
|
||||
key = self.kms_backend.describe_key(
|
||||
self.kms_backend.get_key_id(key_id)
|
||||
)
|
||||
|
||||
return json.dumps(key.to_dict())
|
||||
|
||||
def list_keys(self):
|
||||
|
Loading…
Reference in New Issue
Block a user