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

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