Skip to content

Commit

Permalink
Fixed bug in autoscale group creation. GitHub #249
Browse files Browse the repository at this point in the history
  • Loading branch information
EdLeafe committed Nov 19, 2013
2 parents fcdb984 + 9ae649f commit 4441a5b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pyrax/autoscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,10 @@ def _resolve_lbs(load_balancers):
balancer.
"""
lb_args = []
lbs = utils.coerce_string_to_list(load_balancers)
if not isinstance(load_balancers, list):
lbs = [load_balancers]
else:
lbs = load_balancers
for lb in lbs:
if isinstance(lb, dict):
lb_args.append(lb)
Expand All @@ -731,6 +734,9 @@ def _resolve_lbs(load_balancers):
"loadBalancerId": lb.id,
"port": lb.port,
})
elif isinstance(lb, tuple):
lb_args.append({"loadBalancerId": lb[0],
"port": lb[1]})
else:
# See if it's an ID for a Load Balancer
try:
Expand Down

0 comments on commit 4441a5b

Please sign in to comment.