Fix comparison of priority (#43329)
The existing rule priority comes from aws as a string. It is then compared to the new rule priority, which is defined as an int. This change casts the new rule priority as a string making the comparison work. The reason to cast it as a string rather than an int is used because a priority can also be set to 'default'. When trying to case 'default' as an int, it creates an error.
This commit is contained in:
parent
9e5e35e64c
commit
4549962f85
1 changed files with 1 additions and 1 deletions
|
@ -688,7 +688,7 @@ class ELBListenerRules(object):
|
||||||
for current_rule in self.current_rules:
|
for current_rule in self.current_rules:
|
||||||
current_rule_passed_to_module = False
|
current_rule_passed_to_module = False
|
||||||
for new_rule in self.rules[:]:
|
for new_rule in self.rules[:]:
|
||||||
if current_rule['Priority'] == new_rule['Priority']:
|
if current_rule['Priority'] == str(new_rule['Priority']):
|
||||||
current_rule_passed_to_module = True
|
current_rule_passed_to_module = True
|
||||||
# Remove what we match so that what is left can be marked as 'to be added'
|
# Remove what we match so that what is left can be marked as 'to be added'
|
||||||
rules_to_add.remove(new_rule)
|
rules_to_add.remove(new_rule)
|
||||||
|
|
Loading…
Reference in a new issue