fix policy attribute exception (#4868)
This commit is contained in:
parent
f49c81037b
commit
5daa104a6e
@ -2339,7 +2339,8 @@ class IAMBackend(BaseBackend):
|
|||||||
user.delete_policy(policy_name)
|
user.delete_policy(policy_name)
|
||||||
|
|
||||||
def delete_policy(self, policy_arn):
|
def delete_policy(self, policy_arn):
|
||||||
del self.managed_policies[policy_arn]
|
policy = self.get_policy(policy_arn)
|
||||||
|
del self.managed_policies[policy.arn]
|
||||||
|
|
||||||
def create_access_key(self, user_name=None, status="Active"):
|
def create_access_key(self, user_name=None, status="Active"):
|
||||||
user = self.get_user(user_name)
|
user = self.get_user(user_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user