From 54a6a470b56fc2381a420900e21542df7a6789a5 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 20 Apr 2016 14:36:43 -0700 Subject: [PATCH] Make main() only run when invoked as a script (style cleanup) --- cloud/lxc/lxc_container.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cloud/lxc/lxc_container.py b/cloud/lxc/lxc_container.py index 2abbb41aedf..da9c486a868 100644 --- a/cloud/lxc/lxc_container.py +++ b/cloud/lxc/lxc_container.py @@ -1776,4 +1776,5 @@ def main(): # import module bits from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main()