From 42e459668cb87a153430cb25323b217d30ce6cf5 Mon Sep 17 00:00:00 2001 From: Ian Yon Date: Tue, 5 Nov 2019 19:29:28 -0300 Subject: [PATCH] Support for python 2.7 --- moto/iam/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moto/iam/models.py b/moto/iam/models.py index 81c7d09ca..a7035c445 100644 --- a/moto/iam/models.py +++ b/moto/iam/models.py @@ -735,7 +735,9 @@ class IAMBackend(BaseBackend): ) if policy.arn in self.managed_policies: raise EntityAlreadyExists( - f"A policy called {policy_name} already exists. Duplicate names are not allowed." + "A policy called {} already exists. Duplicate names are not allowed.".format( + policy_name + ) ) self.managed_policies[policy.arn] = policy return policy