From e59c30ab9070e1aab670598c024b192a4a648d19 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Sun, 1 May 2016 19:11:23 -0500 Subject: [PATCH] Don't use two different names for the same flag The nested_abandon_in_progress flag in the StackResource class is used in exactly the same way and does exactly the same thing as the abandon_in_progress flag does in every other Resource class, except that it does the Wrong Thing when adopting a stack fails. Change-Id: I47e412169f58734b8684a645470180d95e13def6 --- heat/engine/resources/stack_resource.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/heat/engine/resources/stack_resource.py b/heat/engine/resources/stack_resource.py index 7e6546351f..649139d7b7 100644 --- a/heat/engine/resources/stack_resource.py +++ b/heat/engine/resources/stack_resource.py @@ -54,7 +54,6 @@ class StackResource(resource.Resource): def __init__(self, name, json_snippet, stack): super(StackResource, self).__init__(name, json_snippet, stack) - self.nested_abandon_in_progress = False self._nested = None self.resource_info = None @@ -456,7 +455,7 @@ class StackResource(resource.Resource): stack_identity = dict(stack.identifier()) try: - if self.nested_abandon_in_progress: + if self.abandon_in_progress: self.rpc_client().abandon_stack(self.context, stack_identity) else: self.rpc_client().delete_stack(self.context, stack_identity) @@ -513,7 +512,7 @@ class StackResource(resource.Resource): return self._check_status_complete(self.CHECK) def prepare_abandon(self): - self.nested_abandon_in_progress = True + self.abandon_in_progress = True nested_stack = self.nested() if nested_stack: return self.nested().prepare_abandon()