diff options
author | Thomas Wiest <twiest@redhat.com> | 2015-03-13 17:01:40 -0400 |
---|---|---|
committer | Thomas Wiest <twiest@redhat.com> | 2015-03-13 17:01:40 -0400 |
commit | 8279328096bceca3d79b51d711433991aef06bf4 (patch) | |
tree | 7ec40378778c5467a09bde824fd37536af7a0afb /bin | |
parent | 4754af459d0b23fc54a9cc5bb2c3062aac02f299 (diff) | |
download | openshift-8279328096bceca3d79b51d711433991aef06bf4.tar.gz openshift-8279328096bceca3d79b51d711433991aef06bf4.tar.bz2 openshift-8279328096bceca3d79b51d711433991aef06bf4.tar.xz openshift-8279328096bceca3d79b51d711433991aef06bf4.zip |
fixed bug in AwsUtil that was causing it to blow up on hosts without an environment set.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/awsutil.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/awsutil.py b/bin/awsutil.py index b6b323778..979455c13 100644 --- a/bin/awsutil.py +++ b/bin/awsutil.py @@ -87,6 +87,10 @@ class AwsUtil(object): inst_by_env = {} for dns, host in inv['_meta']['hostvars'].items(): + # If you don't have an environment tag, we're going to ignore you + if not host.has_key('ec2_tag_environment'): + continue + if host['ec2_tag_environment'] not in inst_by_env: inst_by_env[host['ec2_tag_environment']] = {} host_id = "%s:%s" % (host['ec2_tag_Name'],host['ec2_id']) |