summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandro Locati <me@fale.io>2016-12-05 16:23:23 +0000
committerRyan Brown <sb@ryansb.com>2016-12-05 11:23:23 -0500
commit89827618e2fba70c6796839b6a31f64d39a0efed (patch)
tree8aeee4c73686e539c83eb921a9c5594b29ec1827
parent29698c277773609abb31a1697d20faef51694771 (diff)
downloadansible-modules-extras-89827618e2fba70c6796839b6a31f64d39a0efed.tar.gz
Make `main()` calls conditional - source_control (#3651)
-rw-r--r--source_control/bzr.py4
-rw-r--r--source_control/github_hooks.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/source_control/bzr.py b/source_control/bzr.py
index 8a75789a..961c715d 100644
--- a/source_control/bzr.py
+++ b/source_control/bzr.py
@@ -199,4 +199,6 @@ def main():
# import module snippets
from ansible.module_utils.basic import *
-main()
+
+if __name__ == '__main__':
+ main()
diff --git a/source_control/github_hooks.py b/source_control/github_hooks.py
index eec7a6f9..0430b440 100644
--- a/source_control/github_hooks.py
+++ b/source_control/github_hooks.py
@@ -201,4 +201,5 @@ def main():
from ansible.module_utils.basic import *
from ansible.module_utils.urls import *
-main()
+if __name__ == '__main__':
+ main()