Remove shebang from all files except required
diff --git a/apply_license.sh b/apply_license.sh
index a7a1061..fee9890 100755
--- a/apply_license.sh
+++ b/apply_license.sh
@@ -3,8 +3,10 @@
if ! grep -q Copyright $f; then
cat COPYRIGHT.txt $f > $f.license.py
mv $f.license.py $f
- #prepend shebang for python
- sed -i -e '/^\#\!\/usr\/bin/d' -e '1i\#\!/usr/bin/env python' $f
- chmod +x $f
+ if grep -q "^\#\!/usr/bin" $f; then
+ #prepend shebang for python
+ sed -i -e '/^\#\!\/usr\/bin/d' -e '1i\#\!/usr/bin/env python' $f
+ chmod +x $f
+ fi
fi
done
diff --git a/src/test/builder/yamlFsm.py b/src/test/builder/yamlFsm.py
old mode 100755
new mode 100644
index be38707..d884902
--- a/src/test/builder/yamlFsm.py
+++ b/src/test/builder/yamlFsm.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/cli/__init__.py b/src/test/cli/__init__.py
old mode 100755
new mode 100644
index 7efce3f..2864a46
--- a/src/test/cli/__init__.py
+++ b/src/test/cli/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/cli/ast.py b/src/test/cli/ast.py
old mode 100755
new mode 100644
index 89ff492..fd5dfdb
--- a/src/test/cli/ast.py
+++ b/src/test/cli/ast.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ast
diff --git a/src/test/cli/clicommon.py b/src/test/cli/clicommon.py
old mode 100755
new mode 100644
index 681a8e2..66b1845
--- a/src/test/cli/clicommon.py
+++ b/src/test/cli/clicommon.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/cli/clidriver.py b/src/test/cli/clidriver.py
old mode 100755
new mode 100644
index a769bf1..b10a432
--- a/src/test/cli/clidriver.py
+++ b/src/test/cli/clidriver.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/cli/component.py b/src/test/cli/component.py
old mode 100755
new mode 100644
index 268a82b..12defa8
--- a/src/test/cli/component.py
+++ b/src/test/cli/component.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/cli/onosclidriver.py b/src/test/cli/onosclidriver.py
old mode 100755
new mode 100644
index a86c5cf..252fc73
--- a/src/test/cli/onosclidriver.py
+++ b/src/test/cli/onosclidriver.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/cli/utilities.py b/src/test/cli/utilities.py
old mode 100755
new mode 100644
index 8abefe7..77fd260
--- a/src/test/cli/utilities.py
+++ b/src/test/cli/utilities.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/dhcp/__init__.py b/src/test/dhcp/__init__.py
old mode 100755
new mode 100644
index 69c6f16..b3dcc62
--- a/src/test/dhcp/__init__.py
+++ b/src/test/dhcp/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/dhcp/dhcpTest.py b/src/test/dhcp/dhcpTest.py
old mode 100755
new mode 100644
index b76caf7..b5f5da3
--- a/src/test/dhcp/dhcpTest.py
+++ b/src/test/dhcp/dhcpTest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/flows/__init__.py b/src/test/flows/__init__.py
old mode 100755
new mode 100644
index 69c6f16..b3dcc62
--- a/src/test/flows/__init__.py
+++ b/src/test/flows/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/flows/flowsTest.py b/src/test/flows/flowsTest.py
old mode 100755
new mode 100644
index 260ab90..f28a992
--- a/src/test/flows/flowsTest.py
+++ b/src/test/flows/flowsTest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/fsm/noseMd5AuthHolder.py b/src/test/fsm/noseMd5AuthHolder.py
old mode 100755
new mode 100644
index 4075656..0981b71
--- a/src/test/fsm/noseMd5AuthHolder.py
+++ b/src/test/fsm/noseMd5AuthHolder.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/fsm/nosePAPAuthHolder.py b/src/test/fsm/nosePAPAuthHolder.py
old mode 100755
new mode 100644
index e8bca1c..2ab02e1
--- a/src/test/fsm/nosePAPAuthHolder.py
+++ b/src/test/fsm/nosePAPAuthHolder.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/fsm/noseTlsAuthHolder.py b/src/test/fsm/noseTlsAuthHolder.py
old mode 100755
new mode 100644
index 93b259f..30960a1
--- a/src/test/fsm/noseTlsAuthHolder.py
+++ b/src/test/fsm/noseTlsAuthHolder.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/igmp/__init__.py b/src/test/igmp/__init__.py
old mode 100755
new mode 100644
index 7efce3f..2864a46
--- a/src/test/igmp/__init__.py
+++ b/src/test/igmp/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/igmp/igmpTest.py b/src/test/igmp/igmpTest.py
old mode 100755
new mode 100644
index 5509c4f..5b197f7
--- a/src/test/igmp/igmpTest.py
+++ b/src/test/igmp/igmpTest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/md5/__init__.py b/src/test/md5/__init__.py
old mode 100755
new mode 100644
index 69c6f16..b3dcc62
--- a/src/test/md5/__init__.py
+++ b/src/test/md5/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/md5/md5AuthTest.py b/src/test/md5/md5AuthTest.py
old mode 100755
new mode 100644
index bbf6869..e719d34
--- a/src/test/md5/md5AuthTest.py
+++ b/src/test/md5/md5AuthTest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/onosCli/__init__.py b/src/test/onosCli/__init__.py
old mode 100755
new mode 100644
index bac0fb0..4ce6893
--- a/src/test/onosCli/__init__.py
+++ b/src/test/onosCli/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/onosCli/onosCliTest.py b/src/test/onosCli/onosCliTest.py
old mode 100755
new mode 100644
index 026d627..731cf32
--- a/src/test/onosCli/onosCliTest.py
+++ b/src/test/onosCli/onosCliTest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/pap/__init__.py b/src/test/pap/__init__.py
old mode 100755
new mode 100644
index 69c6f16..b3dcc62
--- a/src/test/pap/__init__.py
+++ b/src/test/pap/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/pap/papTest.py b/src/test/pap/papTest.py
old mode 100755
new mode 100644
index 6bed986..eae7dfa
--- a/src/test/pap/papTest.py
+++ b/src/test/pap/papTest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/setup/radius-config/freeradius/mods-config/python/example.py b/src/test/setup/radius-config/freeradius/mods-config/python/example.py
index 6c2fd33..329e3e0 100755
--- a/src/test/setup/radius-config/freeradius/mods-config/python/example.py
+++ b/src/test/setup/radius-config/freeradius/mods-config/python/example.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-#! /usr/bin/env python
#
# Definitions for RADIUS programs
#
diff --git a/src/test/subscriber/__init__.py b/src/test/subscriber/__init__.py
old mode 100755
new mode 100644
index 69c6f16..b3dcc62
--- a/src/test/subscriber/__init__.py
+++ b/src/test/subscriber/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/subscriber/generate_portmap.py b/src/test/subscriber/generate_portmap.py
old mode 100755
new mode 100644
index fe41530..396d3fa
--- a/src/test/subscriber/generate_portmap.py
+++ b/src/test/subscriber/generate_portmap.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/subscriber/portmaps.py b/src/test/subscriber/portmaps.py
old mode 100755
new mode 100644
index 4d91347..ff28924
--- a/src/test/subscriber/portmaps.py
+++ b/src/test/subscriber/portmaps.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/subscriber/subscriberDb.py b/src/test/subscriber/subscriberDb.py
old mode 100755
new mode 100644
index 1c0eb0e..6cbd984
--- a/src/test/subscriber/subscriberDb.py
+++ b/src/test/subscriber/subscriberDb.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/subscriber/subscriberTest.py b/src/test/subscriber/subscriberTest.py
old mode 100755
new mode 100644
index 733ca18..fd2f906
--- a/src/test/subscriber/subscriberTest.py
+++ b/src/test/subscriber/subscriberTest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/tls/__init__.py b/src/test/tls/__init__.py
old mode 100755
new mode 100644
index 69c6f16..b3dcc62
--- a/src/test/tls/__init__.py
+++ b/src/test/tls/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/tls/tlsAuthTest.py b/src/test/tls/tlsAuthTest.py
old mode 100755
new mode 100644
index 2f21953..c98a069
--- a/src/test/tls/tlsAuthTest.py
+++ b/src/test/tls/tlsAuthTest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/Channels.py b/src/test/utils/Channels.py
old mode 100755
new mode 100644
index b712f96..5e8cd88
--- a/src/test/utils/Channels.py
+++ b/src/test/utils/Channels.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/CordContainer.py b/src/test/utils/CordContainer.py
old mode 100755
new mode 100644
index 0b74b32..b636590
--- a/src/test/utils/CordContainer.py
+++ b/src/test/utils/CordContainer.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/CordTestBase.py b/src/test/utils/CordTestBase.py
old mode 100755
new mode 100644
index 5d78571..038751f
--- a/src/test/utils/CordTestBase.py
+++ b/src/test/utils/CordTestBase.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/CordTestServer.py b/src/test/utils/CordTestServer.py
old mode 100755
new mode 100644
index c360260..2037d71
--- a/src/test/utils/CordTestServer.py
+++ b/src/test/utils/CordTestServer.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/DHCP.py b/src/test/utils/DHCP.py
old mode 100755
new mode 100644
index 1ce8801..653b1e5
--- a/src/test/utils/DHCP.py
+++ b/src/test/utils/DHCP.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/EapMD5.py b/src/test/utils/EapMD5.py
old mode 100755
new mode 100644
index de02300..be71b18
--- a/src/test/utils/EapMD5.py
+++ b/src/test/utils/EapMD5.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/EapPAP.py b/src/test/utils/EapPAP.py
old mode 100755
new mode 100644
index f6fdfd9..a342132
--- a/src/test/utils/EapPAP.py
+++ b/src/test/utils/EapPAP.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/EapTLS.py b/src/test/utils/EapTLS.py
old mode 100755
new mode 100644
index f336b92..19e3f80
--- a/src/test/utils/EapTLS.py
+++ b/src/test/utils/EapTLS.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/EapolAAA.py b/src/test/utils/EapolAAA.py
old mode 100755
new mode 100644
index 04cd40d..419c7e3
--- a/src/test/utils/EapolAAA.py
+++ b/src/test/utils/EapolAAA.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/IGMP.py b/src/test/utils/IGMP.py
old mode 100755
new mode 100644
index 3573d6c..c91dfdd
--- a/src/test/utils/IGMP.py
+++ b/src/test/utils/IGMP.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/McastTraffic.py b/src/test/utils/McastTraffic.py
old mode 100755
new mode 100644
index 0cf1690..c25cb1a
--- a/src/test/utils/McastTraffic.py
+++ b/src/test/utils/McastTraffic.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/OltConfig.py b/src/test/utils/OltConfig.py
old mode 100755
new mode 100644
index e9e53ef..a9fa3c3
--- a/src/test/utils/OltConfig.py
+++ b/src/test/utils/OltConfig.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/OnosCtrl.py b/src/test/utils/OnosCtrl.py
old mode 100755
new mode 100644
index 32c4068..91d5586
--- a/src/test/utils/OnosCtrl.py
+++ b/src/test/utils/OnosCtrl.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/OnosFlowCtrl.py b/src/test/utils/OnosFlowCtrl.py
old mode 100755
new mode 100644
index c194d50..e56e02c
--- a/src/test/utils/OnosFlowCtrl.py
+++ b/src/test/utils/OnosFlowCtrl.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/Stats.py b/src/test/utils/Stats.py
old mode 100755
new mode 100644
index 560c89e..245d259
--- a/src/test/utils/Stats.py
+++ b/src/test/utils/Stats.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/__init__.py b/src/test/utils/__init__.py
old mode 100755
new mode 100644
index dfc386a..714a2b8
--- a/src/test/utils/__init__.py
+++ b/src/test/utils/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/enum.py b/src/test/utils/enum.py
old mode 100755
new mode 100644
index 27dbf46..0be75d9
--- a/src/test/utils/enum.py
+++ b/src/test/utils/enum.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/utils/threadPool.py b/src/test/utils/threadPool.py
old mode 100755
new mode 100644
index 7c2b1dc..016b873
--- a/src/test/utils/threadPool.py
+++ b/src/test/utils/threadPool.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/vrouter/__init__.py b/src/test/vrouter/__init__.py
old mode 100755
new mode 100644
index 858e1ef..b6ae4a3
--- a/src/test/vrouter/__init__.py
+++ b/src/test/vrouter/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#
diff --git a/src/test/vrouter/vrouterTest.py b/src/test/vrouter/vrouterTest.py
old mode 100755
new mode 100644
index 64f3fc8..c81eb8d
--- a/src/test/vrouter/vrouterTest.py
+++ b/src/test/vrouter/vrouterTest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# Copyright 2016-present Ciena Corporation
#