Cast ip_protocol rule as a str() in boto_secgroup.present

Fixes #36961

Protects against a stacktrace lower in the function where we call
ip_protocol.isdigit(), which expects a string.
This commit is contained in:
rallytime 2016-11-03 12:42:01 -06:00
parent 80a99c4cc5
commit 6b930ac7aa

View file

@ -326,7 +326,7 @@ def _get_rule_changes(rules, _rules):
# 2. determine if rule exists in existing security group rules
for rule in rules:
try:
ip_protocol = rule.get('ip_protocol')
ip_protocol = str(rule.get('ip_protocol'))
except KeyError:
raise SaltInvocationError('ip_protocol, to_port, and from_port are'
' required arguments for security group'