From 7b94e3de38bc0942281f2ea2a6478bedd350f4b4 Mon Sep 17 00:00:00 2001 From: John Barker Date: Mon, 24 Oct 2016 14:29:18 +0100 Subject: [PATCH] Conditional main() This is needed to allow the debugger work --- lib/ansible/modules/extras/network/a10/a10_server.py | 3 ++- lib/ansible/modules/extras/network/a10/a10_service_group.py | 3 ++- lib/ansible/modules/extras/network/a10/a10_virtual_server.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/extras/network/a10/a10_server.py b/lib/ansible/modules/extras/network/a10/a10_server.py index d06a2a661a..c89389e2c0 100644 --- a/lib/ansible/modules/extras/network/a10/a10_server.py +++ b/lib/ansible/modules/extras/network/a10/a10_server.py @@ -291,4 +291,5 @@ from ansible.module_utils.basic import * from ansible.module_utils.urls import * from ansible.module_utils.a10 import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/a10/a10_service_group.py b/lib/ansible/modules/extras/network/a10/a10_service_group.py index af664084b6..4b06ad2011 100644 --- a/lib/ansible/modules/extras/network/a10/a10_service_group.py +++ b/lib/ansible/modules/extras/network/a10/a10_service_group.py @@ -338,4 +338,5 @@ from ansible.module_utils.basic import * from ansible.module_utils.urls import * from ansible.module_utils.a10 import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/a10/a10_virtual_server.py b/lib/ansible/modules/extras/network/a10/a10_virtual_server.py index 1a04f1a175..cc0f537a98 100644 --- a/lib/ansible/modules/extras/network/a10/a10_virtual_server.py +++ b/lib/ansible/modules/extras/network/a10/a10_virtual_server.py @@ -292,6 +292,6 @@ def main(): from ansible.module_utils.basic import * from ansible.module_utils.urls import * from ansible.module_utils.a10 import * + if __name__ == '__main__': main() -