From 06c04d17ce043eb7094aa119681d975a7709198b Mon Sep 17 00:00:00 2001 From: Andrew Johnstone Date: Sat, 2 Apr 2016 11:03:26 +0100 Subject: [PATCH] #23784 - check elb vpc key exists --- cluster/aws/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 0ec86ddb3de..44506dfd887 100755 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -151,7 +151,7 @@ function get_igw_id { function get_elbs_in_vpc { # ELB doesn't seem to be on the same platform as the rest of AWS; doesn't support filtering aws elb --output json describe-load-balancers | \ - python -c "import json,sys; lst = [str(lb['LoadBalancerName']) for lb in json.load(sys.stdin)['LoadBalancerDescriptions'] if lb['VPCId'] == '$1']; print('\n'.join(lst))" + python -c "import json,sys; lst = [str(lb['LoadBalancerName']) for lb in json.load(sys.stdin)['LoadBalancerDescriptions'] if 'VPCId' in lb and lb['VPCId'] == '$1']; print('\n'.join(lst))" } function get_instanceid_from_name {