From 81b476cd02ef53a1e665a71bcd098463e1a4ead3 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 18 May 2015 11:59:20 -0700 Subject: [PATCH] Update module "imports" to new style Fixes #1351 --- cloud/amazon/_ec2_ami_search.py | 2 +- cloud/vmware/vsphere_guest.py | 2 +- files/replace.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cloud/amazon/_ec2_ami_search.py b/cloud/amazon/_ec2_ami_search.py index 6296020b777..65953af2b5d 100644 --- a/cloud/amazon/_ec2_ami_search.py +++ b/cloud/amazon/_ec2_ami_search.py @@ -195,7 +195,7 @@ def main(): # this is magic, see lib/ansible/module_common.py -#<> +from ansible.module_utils.basic import * if __name__ == '__main__': main() diff --git a/cloud/vmware/vsphere_guest.py b/cloud/vmware/vsphere_guest.py index 62057759172..a33fd52ea70 100644 --- a/cloud/vmware/vsphere_guest.py +++ b/cloud/vmware/vsphere_guest.py @@ -1321,6 +1321,6 @@ def main(): # this is magic, see lib/ansible/module_common.py -#<> +from ansible.module_utils.basic import * if __name__ == '__main__': main() diff --git a/files/replace.py b/files/replace.py index 588af02391e..a21d84cd8df 100644 --- a/files/replace.py +++ b/files/replace.py @@ -160,6 +160,7 @@ def main(): module.exit_json(changed=changed, msg=msg) # this is magic, see lib/ansible/module_common.py -#<> +from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main()