]> git.openstreetmap.org Git - nominatim.git/commitdiff
cannot use capture_output in subprocess.run
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 6 Jul 2021 14:10:18 +0000 (16:10 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 6 Jul 2021 20:57:42 +0000 (22:57 +0200)
Only available since Python 3.7.

nominatim/tools/exec_utils.py

index 9888d96a73e83ca35abe90a01ebc13bc1eec0df9..560bb78166c54ba7859c5ea275522f8c70804f40 100644 (file)
@@ -70,7 +70,9 @@ def run_api_script(endpoint, project_dir, extra_env=None, phpcgi_bin=None,
     else:
         cmd = [str(phpcgi_bin)]
 
-    proc = subprocess.run(cmd, cwd=str(project_dir), env=env, capture_output=True,
+    proc = subprocess.run(cmd, cwd=str(project_dir), env=env,
+                          stdout=subprocess.PIPE,
+                          stderr=subprocess.PIPE,
                           check=False)
 
     if proc.returncode != 0 or proc.stderr: