diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-08-05 07:50:59 +0200 |
---|---|---|
committer | Daniel Lobato <elobatocs@gmail.com> | 2016-08-08 16:14:39 +0200 |
commit | 5cd9db77c4fa5fc61587f11f83db0c806ae72fa1 (patch) | |
tree | c6678b2f1e21bbc07a38f16d25f9fe132bc622d8 /foreman_ansible_inventory.py | |
parent | aaac5ade66fb3345bcb6f3c3a979d596c91c602e (diff) |
Only call ForemanInventory when __main__ is set
so we can run tools on it that import the module for analysis
Diffstat (limited to 'foreman_ansible_inventory.py')
-rwxr-xr-x | foreman_ansible_inventory.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/foreman_ansible_inventory.py b/foreman_ansible_inventory.py index e42aeb3..8af920c 100755 --- a/foreman_ansible_inventory.py +++ b/foreman_ansible_inventory.py @@ -336,5 +336,6 @@ class ForemanInventory(object): else: return json.dumps(data) -ForemanInventory() +if __name__ == '__main__': + ForemanInventory() |