summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBlair Zajac <blair@imageworks.com>2013-02-09 15:49:54 -0800
committerMichael DeHaan <michael.dehaan@gmail.com>2013-02-16 13:32:48 -0500
commitfa8e653011ad71a632a797ec14b72b4629bf3846 (patch)
tree43edc21395843abc2b8ddab037e3041c9b1a2ab9 /plugins
parent2172201795085bbbf58b145c70756c7e7861f93e (diff)
downloadansible-fa8e653011ad71a632a797ec14b72b4629bf3846.tar.gz
Simplify and correct comparisons with None.
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/inventory/ec2.py4
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