Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix boto.ec2.connection get_all_instances kwarg #1431

Open
wants to merge 1 commit into from

2 participants

@exallium

Passing an empty list to instance_ids returns all of the
instances on the account, which is contradictory to how
the kwarg should function. This fix makes it so this full
list is only retrieved when None is passed as the argument
(as is the default)

@exallium exallium Fix boto.ec2.connection get_all_instances kwarg
Passing an empty list to instance_ids returns all of the
instances on the account, which is contradictory to how
the kwarg should function.  This fix makes it so this full
list is only retrieved when None is passed as the argument
(as is the default)
8dd0c4a
@toastdriven

Thanks for the pull request! Tests demonstrating the behavior would be much appreciated, so we can make sure we don't regress in the future.

@exallium

Hi, I'd be happy to, and will do so as soon as I have the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 10, 2013
  1. @exallium

    Fix boto.ec2.connection get_all_instances kwarg

    exallium authored
    Passing an empty list to instance_ids returns all of the
    instances on the account, which is contradictory to how
    the kwarg should function.  This fix makes it so this full
    list is only retrieved when None is passed as the argument
    (as is the default)
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  boto/ec2/connection.py
View
2  boto/ec2/connection.py
@@ -453,7 +453,7 @@ def get_all_instances(self, instance_ids=None, filters=None):
:return: A list of :class:`boto.ec2.instance.Reservation`
"""
params = {}
- if instance_ids:
+ if instance_ids is not None:
self.build_list_params(params, instance_ids, 'InstanceId')
if filters:
if 'group-id' in filters:
Something went wrong with that request. Please try again.