diff --git a/ci-templates/python.yml b/ci-templates/python.yml
index 2fb8dc83e378f45d56207164f31f97183cc622c1..ccf3676d487de8aed3418bd15753ac326be000c9 100644
--- a/ci-templates/python.yml
+++ b/ci-templates/python.yml
@@ -2,9 +2,9 @@
   stage: build
   before_script: ${PYTHON_VERSION} -m pip -q install flake8
   script:
-    - find . -type f -executable -exec awk ' /^#!.*python/{print FILENAME}  {nextfile}' {} + > /tmp/shebang_python_files
-    - find . -type f -name "*.py" > /tmp/extension_python_files
-    - sort /tmp/extension_python_files /tmp/shebang_python_files | uniq | xargs ${PYTHON_VERSION} -m flake8 --max-line-length 120 --statistics --show-source
+    - find . -type f -executable -exec awk ' /^#!.*python/{print FILENAME}  {nextfile}' {} + > /tmp/python_files
+    - find . -type f -name "*.py" >> /tmp/python_files
+    - sort /tmp/python_files | uniq | xargs ${PYTHON_VERSION} -m flake8 --max-line-length 120 --statistics --show-source
 
 .flake8_extended_template:
   extends: .flake8_template