1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Various simple linting type cleanups on modules

This commit is contained in:
Matt Martz 2016-02-16 15:58:44 -06:00 committed by Matt Clay
parent 4ec0ccd5ac
commit aaf762573e
11 changed files with 8 additions and 14 deletions

View file

@ -235,7 +235,6 @@ def create_image(module, ec2):
for img in images:
if img.name == name:
module.exit_json(msg="AMI name already present", image_id=img.id, state=img.state, changed=False)
sys.exit(0)
else:
module.fail_json(msg="Error in retrieving duplicate AMI details")
else:
@ -313,7 +312,6 @@ def deregister_image(module, ec2):
module.fail_json(msg = "timed out waiting for image to be reregistered/deleted")
module.exit_json(msg="AMI deregister/delete operation complete", changed=True)
sys.exit(0)
def update_image(module, ec2):

View file

@ -179,7 +179,6 @@ def main():
if state == 'list':
module.exit_json(changed=False, tags=tagdict)
sys.exit(0)
# import module snippets
from ansible.module_utils.basic import *

View file

@ -520,7 +520,6 @@ def main():
# Use this snippet to debug through conditionals:
# module.exit_json(msg="Bucket return %s"%bucketrtn)
# sys.exit(0)
# Lets check the src path.
pathrtn = path_check(src)

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Ansible

View file

@ -274,7 +274,6 @@ def main():
from ansible.module_utils.basic import *
from ansible.module_utils.shell import *
from ansible.module_utils.eos import *
if __name__ == '__main__':
main()

View file

@ -380,7 +380,6 @@ def main():
module.exit_json(changed=changed, **args)
module.fail_json(msg='Unexpected position reached')
sys.exit(0)
# import module snippets
from ansible.module_utils.basic import *

View file

@ -356,7 +356,6 @@ def main():
result = SysctlModule(module)
module.exit_json(changed=result.changed)
sys.exit(0)
# import module snippets
from ansible.module_utils.basic import *

View file

@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
# POWERSHELL_COMMON
########