Use the correct resource name

Change-Id: I25d6962dfcc75b703aae6489cd0e751317029bc6
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2012-06-21 14:54:38 +10:00
parent 970c333d4e
commit c20b33dd14
1 changed files with 5 additions and 1 deletions

View File

@ -69,6 +69,8 @@ class WaitCondition(Resource):
def handle_create(self):
self._get_handle_resource_id()
res_name = self.resource_id
cntx = self.stack.context
# keep polling our Metadata to see if the cfn-signal has written
# it yet. The execution here is limited by timeout.
@ -79,7 +81,9 @@ class WaitCondition(Resource):
try:
while status == 'WAITING':
try:
res = db_api.resource_get(self.stack.context, self.id)
res = db_api.resource_get_by_name_and_stack(cntx,
res_name,
self.stack.id)
except Exception as ex:
if 'not found' in ex:
# it has been deleted