diff options
author | Fabio Alessandro Locati <me@fale.io> | 2016-12-05 16:21:26 +0000 |
---|---|---|
committer | Ryan Brown <sb@ryansb.com> | 2016-12-05 11:21:26 -0500 |
commit | 2fcd4af567b6f06108368f03547552d4501cadc5 (patch) | |
tree | bc9de9042cbd3c90c087dd0073caa6e1f86d3aa8 | |
parent | 9684b456be7e7de1d3446273b184ebf9c61d66ba (diff) | |
download | ansible-modules-extras-2fcd4af567b6f06108368f03547552d4501cadc5.tar.gz |
Make `main()` calls conditional - notifications (#3656)
-rw-r--r-- | notification/flowdock.py | 4 | ||||
-rw-r--r-- | notification/grove.py | 4 | ||||
-rwxr-xr-x | notification/hall.py | 4 | ||||
-rw-r--r-- | notification/irc.py | 4 | ||||
-rw-r--r-- | notification/jabber.py | 4 | ||||
-rw-r--r-- | notification/mail.py | 4 | ||||
-rw-r--r-- | notification/mqtt.py | 4 | ||||
-rw-r--r-- | notification/nexmo.py | 3 | ||||
-rw-r--r-- | notification/osx_say.py | 4 | ||||
-rw-r--r-- | notification/pushbullet.py | 4 |
10 files changed, 28 insertions, 11 deletions
diff --git a/notification/flowdock.py b/notification/flowdock.py index 1e1e5e9f..7297ef1f 100644 --- a/notification/flowdock.py +++ b/notification/flowdock.py @@ -191,5 +191,5 @@ def main(): from ansible.module_utils.basic import * from ansible.module_utils.urls import * -main() - +if __name__ == '__main__': + main() diff --git a/notification/grove.py b/notification/grove.py index c7661456..9db937c0 100644 --- a/notification/grove.py +++ b/notification/grove.py @@ -114,4 +114,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.urls import * -main() + +if __name__ == '__main__': + main() diff --git a/notification/hall.py b/notification/hall.py index eb55f5c9..162bb515 100755 --- a/notification/hall.py +++ b/notification/hall.py @@ -94,4 +94,6 @@ def main(): from ansible.module_utils.basic import * from ansible.module_utils.urls import * -main() + +if __name__ == '__main__': + main() diff --git a/notification/irc.py b/notification/irc.py index 8217805e..765e1555 100644 --- a/notification/irc.py +++ b/notification/irc.py @@ -306,4 +306,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.pycompat24 import get_exception -main() + +if __name__ == '__main__': + main() diff --git a/notification/jabber.py b/notification/jabber.py index d9fa0015..4da7f829 100644 --- a/notification/jabber.py +++ b/notification/jabber.py @@ -167,4 +167,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.pycompat24 import get_exception -main() + +if __name__ == '__main__': + main() diff --git a/notification/mail.py b/notification/mail.py index fbbdcff2..f51982f3 100644 --- a/notification/mail.py +++ b/notification/mail.py @@ -308,4 +308,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.pycompat24 import get_exception -main() + +if __name__ == '__main__': + main() diff --git a/notification/mqtt.py b/notification/mqtt.py index 4a6e1084..b28e57dc 100644 --- a/notification/mqtt.py +++ b/notification/mqtt.py @@ -207,4 +207,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.pycompat24 import get_exception -main() + +if __name__ == '__main__': + main() diff --git a/notification/nexmo.py b/notification/nexmo.py index 89a246c0..fa6b0b22 100644 --- a/notification/nexmo.py +++ b/notification/nexmo.py @@ -138,4 +138,5 @@ def main(): from ansible.module_utils.basic import * from ansible.module_utils.urls import * -main() +if __name__ == '__main__': + main() diff --git a/notification/osx_say.py b/notification/osx_say.py index e803bed1..70946228 100644 --- a/notification/osx_say.py +++ b/notification/osx_say.py @@ -76,4 +76,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/notification/pushbullet.py b/notification/pushbullet.py index 0d5ab7c4..434eb1fd 100644 --- a/notification/pushbullet.py +++ b/notification/pushbullet.py @@ -184,4 +184,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() |