Skip to content

Fix LoadBalancer.set_policies_of_listener() when list of policies is empty #640

Open
wants to merge 2 commits into from

2 participants

@werkshy
werkshy commented Mar 14, 2012

Allows us to send a request that disables stickiness for a listener, as seen
here: https://forums.aws.amazon.com/thread.jspa?threadID=50042

@werkshy werkshy Fix elb.set_policies_of_listener() with no policies
Allows us to send a request that disables stickiness for a listener, as seen
here: https://forums.aws.amazon.com/thread.jspa?threadID=50042
0004265
@garnaat garnaat and 1 other commented on an outdated diff Mar 16, 2012
boto/ec2/elb/__init__.py
@@ -455,6 +455,10 @@ def set_lb_policies_of_listener(self, lb_name, lb_port, policies):
'LoadBalancerName' : lb_name,
'LoadBalancerPort' : lb_port,
}
+ if policies:
+ self.build_list_params(params, policies, 'PolicyNames.member.%d')
+ else:
+ params["PolicyNames"] = ""
self.build_list_params(params, policies, 'PolicyNames.member.%d')
@garnaat
the boto project member
garnaat added a note Mar 16, 2012

Shouldn't this line be removed?

@werkshy
werkshy added a note Mar 16, 2012

Yes it should! Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@werkshy
werkshy commented Mar 16, 2012

Update with that redundant line removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.