diff --git a/contrib/inventory/ec2.py b/contrib/inventory/ec2.py index c16e770259c..de549d29bdf 100755 --- a/contrib/inventory/ec2.py +++ b/contrib/inventory/ec2.py @@ -1567,5 +1567,6 @@ class Ec2Inventory(object): return json.dumps(data) -# Run the script -Ec2Inventory() +if __name__ == '__main__': + # Run the script + Ec2Inventory()