summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaoBeier <tao12345666333@163.com>2017-01-11 10:47:03 +0800
committerToshio Kuratomi <a.badger@gmail.com>2017-01-10 18:47:03 -0800
commit6ec0369c266786dac96b4ebd6b889d8d4bda2e62 (patch)
treee2c67e991bc9e0d21a139bdd1fedb413273c19a1
parent1786c81a654611fe2c4ca4f03904aab0b533c1ed (diff)
downloadansible-6ec0369c266786dac96b4ebd6b889d8d4bda2e62.tar.gz
fix indent (#20071)
-rwxr-xr-xbin/ansible2
-rwxr-xr-xcontrib/inventory/docker.py2
-rwxr-xr-xexamples/scripts/uptime.py2
-rw-r--r--lib/ansible/inventory/group.py4
4 files changed, 5 insertions, 5 deletions
diff --git a/bin/ansible b/bin/ansible
index 3fa7091819..22dd449d3f 100755
--- a/bin/ansible
+++ b/bin/ansible
@@ -129,7 +129,7 @@ if __name__ == '__main__':
log_only = False
else:
display.display("to see the full traceback, use -vvv")
- log_only = True
+ log_only = True
display.display(u"the full traceback was:\n\n%s" % to_text(traceback.format_exc()), log_only=log_only)
exit_code = 250
finally:
diff --git a/contrib/inventory/docker.py b/contrib/inventory/docker.py
index 3ea1831443..31a18b8406 100755
--- a/contrib/inventory/docker.py
+++ b/contrib/inventory/docker.py
@@ -444,7 +444,7 @@ class AnsibleDockerClient(Client):
tls_config = TLSConfig(**kwargs)
return tls_config
except TLSParameterError as exc:
- self.fail("TLS config error: %s" % exc)
+ self.fail("TLS config error: %s" % exc)
def _get_connect_params(self):
auth = self.auth_params
diff --git a/examples/scripts/uptime.py b/examples/scripts/uptime.py
index 6357d5a75e..be533527fa 100755
--- a/examples/scripts/uptime.py
+++ b/examples/scripts/uptime.py
@@ -47,7 +47,7 @@ def main():
variable_manager.set_inventory(inventory)
# create play with tasks
- play_source = dict(
+ play_source = dict(
name = "Ansible Play",
hosts = host_list,
gather_facts = 'no',
diff --git a/lib/ansible/inventory/group.py b/lib/ansible/inventory/group.py
index 63c297aaa4..a6ab35c3e9 100644
--- a/lib/ansible/inventory/group.py
+++ b/lib/ansible/inventory/group.py
@@ -83,7 +83,7 @@ class Group:
raise Exception("can't add group to itself")
# don't add if it's already there
- if not group in self.child_groups:
+ if group not in self.child_groups:
self.child_groups.append(group)
# update the depth of the child
@@ -94,7 +94,7 @@ class Group:
# now add self to child's parent_groups list, but only if there
# isn't already a group with the same name
- if not self.name in [g.name for g in group.parent_groups]:
+ if self.name not in [g.name for g in group.parent_groups]:
group.parent_groups.append(self)
self.clear_hosts_cache()