diff options
author | Michael J. Schultz <mjschultz@gmail.com> | 2015-09-30 15:50:44 -0500 |
---|---|---|
committer | Michael J. Schultz <mjschultz@gmail.com> | 2015-09-30 15:50:44 -0500 |
commit | c61d430191ec4c2b758274727c8bdcf007b3bd74 (patch) | |
tree | 1fa5faae52ec8724170ecdf3f27cd45dcac345b4 /notification/sns.py | |
parent | beb362dd116665aaf0a7e02f64f89108da8b2910 (diff) | |
download | ansible-modules-extras-c61d430191ec4c2b758274727c8bdcf007b3bd74.tar.gz |
sns: remove BabyJSON
Diffstat (limited to 'notification/sns.py')
-rw-r--r-- | notification/sns.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/notification/sns.py b/notification/sns.py index 70030d66..5fd81e20 100644 --- a/notification/sns.py +++ b/notification/sns.py @@ -107,9 +107,9 @@ try: import boto import boto.ec2 import boto.sns + HAS_BOTO = True except ImportError: - print "failed=True msg='boto required for this module'" - sys.exit(1) + HAS_BOTO = False def arn_topic_lookup(connection, short_topic): @@ -140,6 +140,9 @@ def main(): module = AnsibleModule(argument_spec=argument_spec) + if not HAS_BOTO: + module.fail_json(msg='boto required for this module') + msg = module.params['msg'] subject = module.params['subject'] topic = module.params['topic'] |