709518
From f355d4902890e5b4db15b87903a299697764bc8a Mon Sep 17 00:00:00 2001
709518
From: Honggang Li <honli@redhat.com>
709518
Date: Fri, 8 Feb 2019 21:26:39 -0500
709518
Subject: [PATCH] Fix shebang for python scripts
709518
709518
rhel-8 does not support python2. User '#!/usr/bin/python3' for all
709518
python scripts which with a shebang.
709518
709518
The substitution was done with following bash script.
709518
709518
====
709518
709518
pys=$(find . -type f -name '*.py')
709518
709518
for f in $pys; do
709518
	sed -ne '1p' $f | grep -q -E '^#!/usr/bin'
709518
	if [ $? -eq 0 ]; then
709518
		echo $f
709518
		sed -e '/^#!\/usr\/bin/d' -i $f
709518
		sed -e '1 i\#!/usr/bin/python3' -i $f
709518
	fi
709518
done
709518
===
709518
709518
Signed-off-by: Honggang Li <honli@redhat.com>
709518
---
709518
 mtcr_py/test.py                                         | 2 +-
709518
 small_utils/mlxfwresetlib/mcra.py                       | 2 +-
709518
 small_utils/mlxfwresetlib/mlnx_peripheral_components.py | 2 +-
709518
 small_utils/mlxfwresetlib/mlxfwreset_mlnxdriver.py      | 2 +-
709518
 small_utils/mlxfwresetlib/mlxfwreset_status_checker.py  | 2 +-
709518
 small_utils/mlxfwresetlib/mlxfwreset_utils.py           | 2 +-
709518
 small_utils/mlxfwresetlib/pci_device.py                 | 2 +-
709518
 small_utils/mstfwreset.py                               | 2 +-
709518
 8 files changed, 8 insertions(+), 8 deletions(-)
709518
709518
diff --git a/mtcr_py/test.py b/mtcr_py/test.py
709518
index 74c5d28..1e44232 100755
709518
--- a/mtcr_py/test.py
709518
+++ b/mtcr_py/test.py
709518
@@ -1,4 +1,4 @@
709518
-#!/usr/bin/env python
709518
+#!/usr/bin/python3
709518
 # Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
709518
 #
709518
 # This software is available to you under a choice of one of two
709518
diff --git a/small_utils/mlxfwresetlib/mcra.py b/small_utils/mlxfwresetlib/mcra.py
709518
index 2144d43..bc44356 100644
709518
--- a/small_utils/mlxfwresetlib/mcra.py
709518
+++ b/small_utils/mlxfwresetlib/mcra.py
709518
@@ -1,4 +1,4 @@
709518
-#!/usr/bin/python
709518
+#!/usr/bin/python3
709518
 
709518
 # Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
709518
 #
709518
diff --git a/small_utils/mlxfwresetlib/mlnx_peripheral_components.py b/small_utils/mlxfwresetlib/mlnx_peripheral_components.py
709518
index 0ddf8d9..469e24b 100644
709518
--- a/small_utils/mlxfwresetlib/mlnx_peripheral_components.py
709518
+++ b/small_utils/mlxfwresetlib/mlnx_peripheral_components.py
709518
@@ -1,4 +1,4 @@
709518
-#!/usr/bin/python
709518
+#!/usr/bin/python3
709518
 
709518
 # Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
709518
 #
709518
diff --git a/small_utils/mlxfwresetlib/mlxfwreset_mlnxdriver.py b/small_utils/mlxfwresetlib/mlxfwreset_mlnxdriver.py
709518
index 4971b00..1f34925 100755
709518
--- a/small_utils/mlxfwresetlib/mlxfwreset_mlnxdriver.py
709518
+++ b/small_utils/mlxfwresetlib/mlxfwreset_mlnxdriver.py
709518
@@ -1,4 +1,4 @@
709518
-#!/usr/bin/python
709518
+#!/usr/bin/python3
709518
 
709518
 # Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
709518
 #
709518
diff --git a/small_utils/mlxfwresetlib/mlxfwreset_status_checker.py b/small_utils/mlxfwresetlib/mlxfwreset_status_checker.py
709518
index 1d614ac..153c87b 100755
709518
--- a/small_utils/mlxfwresetlib/mlxfwreset_status_checker.py
709518
+++ b/small_utils/mlxfwresetlib/mlxfwreset_status_checker.py
709518
@@ -1,4 +1,4 @@
709518
-#!/usr/bin/python
709518
+#!/usr/bin/python3
709518
 
709518
 # Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
709518
 #
709518
diff --git a/small_utils/mlxfwresetlib/mlxfwreset_utils.py b/small_utils/mlxfwresetlib/mlxfwreset_utils.py
709518
index 9b07328..2c64044 100755
709518
--- a/small_utils/mlxfwresetlib/mlxfwreset_utils.py
709518
+++ b/small_utils/mlxfwresetlib/mlxfwreset_utils.py
709518
@@ -1,4 +1,4 @@
709518
-#!/usr/bin/python
709518
+#!/usr/bin/python3
709518
 
709518
 # Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
709518
 #
709518
diff --git a/small_utils/mlxfwresetlib/pci_device.py b/small_utils/mlxfwresetlib/pci_device.py
709518
index 69a65ed..04a6c9a 100644
709518
--- a/small_utils/mlxfwresetlib/pci_device.py
709518
+++ b/small_utils/mlxfwresetlib/pci_device.py
709518
@@ -1,4 +1,4 @@
709518
-#!/usr/bin/python
709518
+#!/usr/bin/python3
709518
 
709518
 # Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
709518
 #
709518
diff --git a/small_utils/mstfwreset.py b/small_utils/mstfwreset.py
709518
index 6d45200..f764de3 100755
709518
--- a/small_utils/mstfwreset.py
709518
+++ b/small_utils/mstfwreset.py
709518
@@ -1,4 +1,4 @@
709518
-#!/usr/bin/python
709518
+#!/usr/bin/python3
709518
 
709518
 # Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
709518
 #
709518
-- 
709518
2.20.1
709518