From: Dmitry Shachnev <mitya57@debian.org>
Date: Sun, 12 Jan 2020 00:39:58 +0300
Subject: test_buildhtml: Avoid shell=True and use the current interpreter

---
 tools/test/test_buildhtml.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/test/test_buildhtml.py b/tools/test/test_buildhtml.py
index 858b56b..dda840e 100644
--- a/tools/test/test_buildhtml.py
+++ b/tools/test/test_buildhtml.py
@@ -25,6 +25,7 @@ Build-HTML Options
 import unittest
 import os
 from subprocess import Popen, PIPE, STDOUT
+import sys
 import tempfile
 
 
@@ -36,7 +37,7 @@ def process_and_return_filelist(options):
     dirs = []
     files = []
     try:
-        p = Popen(buildhtml_path+" "+options, shell=True,
+        p = Popen([sys.executable, buildhtml_path] + options,
                   stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
         (cin, cout) = (p.stdin, p.stdout)
     except NameError:
@@ -98,12 +99,12 @@ class BuildHtmlTests(unittest.TestCase):
         os.rmdir(self.root)
 
     def test_1(self):
-        opts = "--dry-run "+ self.root
+        opts = ["--dry-run", self.root]
         dirs, files = process_and_return_filelist( opts )
         self.assertEqual(files.count("one.txt"), 4)
 
     def test_local(self):
-        opts = "--dry-run --local "+ self.root
+        opts = ["--dry-run", "--local", self.root]
         dirs, files = process_and_return_filelist( opts )
         self.assertEqual( len(dirs), 1)
         self.assertEqual( files, [])
