Blame SOURCES/0001-Fix-shebang-for-python-scripts.patch

11a3d7
From 8a54316a15c76154d307ba53be5d98b8503a5d5f Mon Sep 17 00:00:00 2001
11a3d7
From: Honggang Li <honli@redhat.com>
11a3d7
Date: Thu, 13 Jun 2019 20:58:50 -0400
11a3d7
Subject: [PATCH] Fix shebang for python scripts
11a3d7
11a3d7
rhel-8 does not support python2. User '#!/usr/bin/python3' for all
11a3d7
python scripts which with a shebang.
11a3d7
11a3d7
The substitution was done with following bash script.
11a3d7
11a3d7
====
11a3d7
11a3d7
pys=$(find . -type f -name '*.py')
11a3d7
11a3d7
for f in $pys; do
11a3d7
        sed -ne '1p' $f | grep -q -E '^#!/usr/bin'
11a3d7
        if [ $? -eq 0 ]; then
11a3d7
                echo $f
11a3d7
                sed -e '/^#!\/usr\/bin/d' -i $f
11a3d7
                sed -e '1 i\#!/usr/bin/python3' -i $f
11a3d7
        fi
11a3d7
done
11a3d7
===
11a3d7
11a3d7
Signed-off-by: Honggang Li <honli@redhat.com>
11a3d7
---
11a3d7
 tracers/fwtrace/mstfwtrace.py | 2 +-
11a3d7
 1 file changed, 1 insertion(+), 1 deletion(-)
11a3d7
11a3d7
diff --git a/tracers/fwtrace/mstfwtrace.py b/tracers/fwtrace/mstfwtrace.py
11a3d7
index 3c3ef8f..5193a31 100755
11a3d7
--- a/tracers/fwtrace/mstfwtrace.py
11a3d7
+++ b/tracers/fwtrace/mstfwtrace.py
11a3d7
@@ -1,4 +1,4 @@
11a3d7
-#!/usr/bin/env python
11a3d7
+#!/usr/bin/python3
11a3d7
 # --
11a3d7
 # 
11a3d7
 # Copyright (C) 2019 Mellanox Technologies Ltd. All rights reserved.
11a3d7
-- 
11a3d7
2.20.1
11a3d7