Merge "stack event loops: handle get None result"
This commit is contained in:
commit
b0e6d92ae0
@ -106,11 +106,12 @@ def poll_for_events(
|
|||||||
if no_event_polls >= 2:
|
if no_event_polls >= 2:
|
||||||
# after 2 polls with no events, fall back to a stack get
|
# after 2 polls with no events, fall back to a stack get
|
||||||
stack = cloud.get_stack(stack_name, resolve_outputs=False)
|
stack = cloud.get_stack(stack_name, resolve_outputs=False)
|
||||||
stack_status = stack['stack_status']
|
if stack:
|
||||||
msg = msg_template % dict(name=stack_name, status=stack_status)
|
stack_status = stack['stack_status']
|
||||||
if stop_check(stack_status):
|
msg = msg_template % dict(name=stack_name, status=stack_status)
|
||||||
return stack_status, msg
|
if stop_check(stack_status):
|
||||||
# go back to event polling again
|
return stack_status, msg
|
||||||
no_event_polls = 0
|
# go back to event polling again
|
||||||
|
no_event_polls = 0
|
||||||
|
|
||||||
time.sleep(poll_period)
|
time.sleep(poll_period)
|
||||||
|
Loading…
Reference in New Issue
Block a user