Clean up shebangs for various files.

- Remove shebangs from:
  - ini files
  - unit tests
  - module_utils
  - plugins
  - module_docs_fragments
  - non-executable Makefiles
- Change non-modules from '/usr/bin/python' to '/usr/bin/env python'.
- Change '/bin/env' to '/usr/bin/env'.

Also removed main functions from unit tests (since they no longer
have a shebang) and fixed a python 3 compatibility issue with
update_bundled.py so it does not need to specify a python 2 shebang.

A script was added to check for unexpected shebangs in files.
This script is run during CI on Shippable.
This commit is contained in:
Matt Clay
2016-11-02 14:47:42 -07:00
parent 702ac436dc
commit 0d46805979
24 changed files with 26 additions and 40 deletions

View File

@@ -1,5 +1,3 @@
#!/usr/bin/python
from nose.plugins.skip import SkipTest
try:
@@ -489,9 +487,3 @@ class AnsibleEc2VpcNatGatewayFunctions(unittest.TestCase):
)
self.assertFalse(success)
self.assertFalse(changed)
def main():
unittest.main()
if __name__ == '__main__':
main()

View File

@@ -1,5 +1,3 @@
#!/usr/bin/python
from nose.plugins.skip import SkipTest
try:
@@ -287,10 +285,3 @@ class AnsibleKinesisStreamFunctions(unittest.TestCase):
self.assertTrue(changed)
self.assertEqual(results, should_return)
self.assertEqual(err_msg, 'Kinesis Stream test updated successfully.')
def main():
unittest.main()
if __name__ == '__main__':
main()