From daa6bfe84debe891a1e16851dc95d5cc454604f2 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Wed, 4 Apr 2018 14:56:51 -0400 Subject: [PATCH] Dont iterate over dictionary that we are modifying. --- moto/ecs/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moto/ecs/models.py b/moto/ecs/models.py index e0b29cb01..998975650 100644 --- a/moto/ecs/models.py +++ b/moto/ecs/models.py @@ -24,7 +24,7 @@ class BaseObject(BaseModel): def gen_response_object(self): response_object = copy(self.__dict__) - for key, value in response_object.items(): + for key, value in self.__dict__.items(): if '_' in key: response_object[self.camelCase(key)] = value del response_object[key]