Merge "Skip security groups w/ no protocol."

This commit is contained in:
Jenkins
2013-04-02 16:10:31 +00:00
committed by Gerrit Code Review

View File

@@ -1885,7 +1885,8 @@ def do_secgroup_delete_rule(cs, args):
secgroup = _get_secgroup(cs, args.secgroup)
for rule in secgroup.rules:
if (rule['ip_protocol'].upper() == args.ip_proto.upper() and
if (rule['ip_protocol'] and
rule['ip_protocol'].upper() == args.ip_proto.upper() and
rule['from_port'] == int(args.from_port) and
rule['to_port'] == int(args.to_port) and
rule['ip_range']['cidr'] == args.cidr):