ansible/ansible — pull request #5273 by jsdalton (2013-12-12 21:11:52+00:00)
Title: Make sure initial_state is initialized

This fixes a small (but critical) bug that was brought up in the comments on pull request #5232.

> Getting an error here: If wait isn't set, initial_state is not declared before it's used:
>
> invalid output was: Traceback (most recent call last):
> File "/home/rawr/.ansible/tmp/ansible-1386807871.34-9619501383113/ec2_elb", line 1411, in
> main()
> File "/home/rawr/.ansible/tmp/ansible-1386807871.34-9619501383113/ec2_elb", line 336, in main
> elb_man.deregister(wait)
> File "/home/rawr/.ansible/tmp/ansible-1386807871.34-9619501383113/ec2_elb", line 144, in deregister
> if initial_state and initial_state.state == 'InService':
> UnboundLocalError: local variable 'initial_state' referenced before assignment