From d30f5c413a66c4264227fb0eeea54ad47efa3c89 Mon Sep 17 00:00:00 2001
From: Wojciech Barcik <wbarcik@syncad.com>
Date: Thu, 12 Nov 2020 10:56:22 -0500
Subject: [PATCH] Change shebang to "#!/usr/bin/env python3" in python shell
 scripts. Fix #103

---
 .gitlab-ci-docker.yaml                                        | 1 -
 hive/cli.py                                                   | 2 +-
 hive/utils/profiler.py                                        | 2 +-
 scripts/ci/benchmark_generator.py                             | 2 +-
 scripts/ci/json_report_parser.py                              | 2 +-
 scripts/ci/start_api_benchmark.py                             | 4 ++--
 scripts/operation_extractor.py                                | 2 +-
 scripts/xml_report_parser.py                                  | 2 +-
 .../manual_tests/list_comments_by_author_last_update_test.py  | 2 +-
 tests/manual_tests/list_comments_by_cashout_test.py           | 2 +-
 tests/manual_tests/list_comments_by_parent_test.py            | 2 +-
 tests/manual_tests/list_comments_by_permlink.py               | 2 +-
 tests/manual_tests/list_comments_by_root_test.py              | 4 ++--
 tests/manual_tests/list_comments_by_update_test.py            | 2 +-
 14 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/.gitlab-ci-docker.yaml b/.gitlab-ci-docker.yaml
index 1a3b7f6ca..b849f7958 100644
--- a/.gitlab-ci-docker.yaml
+++ b/.gitlab-ci-docker.yaml
@@ -3,7 +3,6 @@ stages:
   - data-supply
   - e2e-test
 
-
 variables:
 
   PGPASSWORD: $HIVEMIND_POSTGRES_PASSWORD
diff --git a/hive/cli.py b/hive/cli.py
index b2c4a88a2..6b8d46724 100755
--- a/hive/cli.py
+++ b/hive/cli.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 """CLI service router"""
 
diff --git a/hive/utils/profiler.py b/hive/utils/profiler.py
index 809e9b9c7..22c59a4b1 100755
--- a/hive/utils/profiler.py
+++ b/hive/utils/profiler.py
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python3
+#!/usr/bin/env python3
 """Hive profiling tools"""
 
 import cProfile
diff --git a/scripts/ci/benchmark_generator.py b/scripts/ci/benchmark_generator.py
index ae679c912..e32358b5a 100755
--- a/scripts/ci/benchmark_generator.py
+++ b/scripts/ci/benchmark_generator.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 from json import dumps
 
diff --git a/scripts/ci/json_report_parser.py b/scripts/ci/json_report_parser.py
index 7403dfd31..38ff91a35 100755
--- a/scripts/ci/json_report_parser.py
+++ b/scripts/ci/json_report_parser.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 """ Parse json file generated by pytest benchmarks and create htm report file
     for files exceeding expected threshold print information to the console
 """
diff --git a/scripts/ci/start_api_benchmark.py b/scripts/ci/start_api_benchmark.py
index 92fb6e73d..cf726cc3b 100755
--- a/scripts/ci/start_api_benchmark.py
+++ b/scripts/ci/start_api_benchmark.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 import os
 import subprocess
 from json import load, dump
@@ -60,7 +60,7 @@ if __name__ == "__main__":
 
     hivemind_url = "http://{}:{}".format(args.hivemind_address, args.hivemind_port)
     test_directories = get_test_directories(args.tests_root_dir)
-    
+
     benchmarks_files = []
     for test_directory in test_directories:
         benchmark_file_name = "benchmark_" + test_directory.split("/")[-1] + ".py"
diff --git a/scripts/operation_extractor.py b/scripts/operation_extractor.py
index 1a25c0329..f7821c7e9 100755
--- a/scripts/operation_extractor.py
+++ b/scripts/operation_extractor.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 """
 This script will scan blocks from range `from_block` to `to_block` if it finds operation defined in `operations` it will
 save such block to a `output_file`. Blocks not containing any operations from list `operations` will be saved empty.
diff --git a/scripts/xml_report_parser.py b/scripts/xml_report_parser.py
index f229e9fc8..de2977223 100755
--- a/scripts/xml_report_parser.py
+++ b/scripts/xml_report_parser.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 import os
 
 from xml.dom import minidom
diff --git a/tests/manual_tests/list_comments_by_author_last_update_test.py b/tests/manual_tests/list_comments_by_author_last_update_test.py
index 815e9657d..06e072dc8 100644
--- a/tests/manual_tests/list_comments_by_author_last_update_test.py
+++ b/tests/manual_tests/list_comments_by_author_last_update_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 from test_base import run_test
 
diff --git a/tests/manual_tests/list_comments_by_cashout_test.py b/tests/manual_tests/list_comments_by_cashout_test.py
index 77ca37fe5..4ec3609b4 100644
--- a/tests/manual_tests/list_comments_by_cashout_test.py
+++ b/tests/manual_tests/list_comments_by_cashout_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 from test_base import run_test
 
 if __name__ == '__main__':
diff --git a/tests/manual_tests/list_comments_by_parent_test.py b/tests/manual_tests/list_comments_by_parent_test.py
index 944479b37..ea1d80190 100644
--- a/tests/manual_tests/list_comments_by_parent_test.py
+++ b/tests/manual_tests/list_comments_by_parent_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 from test_base import run_test
 
 if __name__ == '__main__':
diff --git a/tests/manual_tests/list_comments_by_permlink.py b/tests/manual_tests/list_comments_by_permlink.py
index 56c3de3b2..6d8db7e22 100644
--- a/tests/manual_tests/list_comments_by_permlink.py
+++ b/tests/manual_tests/list_comments_by_permlink.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 from test_base import run_test
 
 if __name__ == '__main__':
diff --git a/tests/manual_tests/list_comments_by_root_test.py b/tests/manual_tests/list_comments_by_root_test.py
index 5caf5e423..00a01544c 100644
--- a/tests/manual_tests/list_comments_by_root_test.py
+++ b/tests/manual_tests/list_comments_by_root_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 from test_base import run_test
 
 if __name__ == '__main__':
@@ -6,7 +6,7 @@ if __name__ == '__main__':
     test_hive_node_url = 'http://127.0.0.1:8080'
 
     payload = {
-        "jsonrpc" : "2.0", 
+        "jsonrpc" : "2.0",
         "method" : "database_api.list_comments",
         "params" : {
             "start" : ['steemit', 'firstpost', '', ''],
diff --git a/tests/manual_tests/list_comments_by_update_test.py b/tests/manual_tests/list_comments_by_update_test.py
index 53b4fe5f7..f7c3efd4f 100644
--- a/tests/manual_tests/list_comments_by_update_test.py
+++ b/tests/manual_tests/list_comments_by_update_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 from test_base import run_test
 
 if __name__ == '__main__':
-- 
GitLab