From 32bf194ddcda79a8e0cff6575a3c8b40b765ccf4 Mon Sep 17 00:00:00 2001 From: Nils <> Date: Tue, 21 Apr 2020 21:11:49 +0200 Subject: [PATCH] replace py3.7 with py3.6 parameter. --- engine/findprograms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/findprograms.py b/engine/findprograms.py index 6aeadbf..db3f60d 100644 --- a/engine/findprograms.py +++ b/engine/findprograms.py @@ -81,7 +81,7 @@ class SupportedProgramsDatabase(object): for path in executablePaths: command = f"grep -iRsnl {path} -e /nsm/server/announce" #Py>=3.7 completedProcess = subprocess.run(command, capture_output=True, text=True, shell=True) - completedProcess = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, shell=True) + completedProcess = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, shell=True) #universal_newlines is an alias for text, which was deprecated in 3.7 because text is more understandable. capture_output replaces the two PIPEs in 3.7 for fullPath in completedProcess.stdout.split(): exe = pathlib.Path(fullPath).relative_to(path) if not str(exe) in self.blacklist: