20486b
From 8a54316a15c76154d307ba53be5d98b8503a5d5f Mon Sep 17 00:00:00 2001
709518
From: Honggang Li <honli@redhat.com>
20486b
Date: Thu, 13 Jun 2019 20:58:50 -0400
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
20486b
        sed -ne '1p' $f | grep -q -E '^#!/usr/bin'
20486b
        if [ $? -eq 0 ]; then
20486b
                echo $f
20486b
                sed -e '/^#!\/usr\/bin/d' -i $f
20486b
                sed -e '1 i\#!/usr/bin/python3' -i $f
20486b
        fi
709518
done
709518
===
709518
709518
Signed-off-by: Honggang Li <honli@redhat.com>
709518
---
20486b
 tracers/fwtrace/mstfwtrace.py | 2 +-
20486b
 1 file changed, 1 insertion(+), 1 deletion(-)
709518
20486b
diff --git a/tracers/fwtrace/mstfwtrace.py b/tracers/fwtrace/mstfwtrace.py
20486b
index 3c3ef8f..5193a31 100755
20486b
--- a/tracers/fwtrace/mstfwtrace.py
20486b
+++ b/tracers/fwtrace/mstfwtrace.py
709518
@@ -1,4 +1,4 @@
709518
-#!/usr/bin/env python
709518
+#!/usr/bin/python3
20486b
 # --
20486b
 # 
20486b
 # Copyright (C) 2019 Mellanox Technologies Ltd. All rights reserved.
709518
-- 
709518
2.20.1
709518