diff options
author | Blair Zajac <blair@imageworks.com> | 2013-02-09 15:49:54 -0800 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2013-02-16 13:32:48 -0500 |
commit | fa8e653011ad71a632a797ec14b72b4629bf3846 (patch) | |
tree | 43edc21395843abc2b8ddab037e3041c9b1a2ab9 /plugins | |
parent | 2172201795085bbbf58b145c70756c7e7861f93e (diff) | |
download | ansible-fa8e653011ad71a632a797ec14b72b4629bf3846.tar.gz |
Simplify and correct comparisons with None.
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/inventory/ec2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/inventory/ec2.py b/plugins/inventory/ec2.py index fcad5703ee..08c37c065e 100755 --- a/plugins/inventory/ec2.py +++ b/plugins/inventory/ec2.py @@ -283,7 +283,7 @@ class Ec2Inventory(object): else: dest = getattr(instance, self.destination_variable) - if dest == None: + if not dest: # Skip instances we cannot address (e.g. private VPC subnet) return @@ -303,7 +303,7 @@ class Ec2Inventory(object): self.push(self.inventory, self.to_safe('type_' + instance.instance_type), dest) # Inventory: Group by key pair - if instance.key_name != None: + if instance.key_name: self.push(self.inventory, self.to_safe('key_' + instance.key_name), dest) # Inventory: Group by security group |