summaryrefslogtreecommitdiffstats
path: root/inventory/aws
diff options
context:
space:
mode:
authorThomas Wiest <twiest@redhat.com>2015-03-09 10:40:32 -0400
committerThomas Wiest <twiest@redhat.com>2015-03-09 10:44:45 -0400
commit4c409949300274bcd829dda89562402be0f4e976 (patch)
tree904fd267d0f98df61ed915c5c48f59b6e7e5b5fd /inventory/aws
parentf8df2a785f791151e11f8274711c5d4405e550eb (diff)
downloadopenshift-4c409949300274bcd829dda89562402be0f4e976.tar.gz
openshift-4c409949300274bcd829dda89562402be0f4e976.tar.bz2
openshift-4c409949300274bcd829dda89562402be0f4e976.tar.xz
openshift-4c409949300274bcd829dda89562402be0f4e976.zip
fixed bug in new ec2.py destination_format code
Diffstat (limited to 'inventory/aws')
-rwxr-xr-x[-rw-r--r--]inventory/aws/ec2.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/inventory/aws/ec2.py b/inventory/aws/ec2.py
index f4e029553..1a863d8a8 100644..100755
--- a/inventory/aws/ec2.py
+++ b/inventory/aws/ec2.py
@@ -215,8 +215,14 @@ class Ec2Inventory(object):
# Destination addresses
self.destination_variable = config.get('ec2', 'destination_variable')
self.vpc_destination_variable = config.get('ec2', 'vpc_destination_variable')
- self.destination_format = config.get('ec2', 'destination_format')
- self.destination_format_tags = config.get('ec2', 'destination_format_tags', '').split(',')
+
+ if config.has_option('ec2', 'destination_format') and \
+ config.has_option('ec2', 'destination_format_tags'):
+ self.destination_format = config.get('ec2', 'destination_format')
+ self.destination_format_tags = config.get('ec2', 'destination_format_tags').split(',')
+ else:
+ self.destination_format = None
+ self.destination_format_tags = None
# Route53
self.route53_enabled = config.getboolean('ec2', 'route53')