From 87e2bb3dbfeb995c15fba7f784a47ac34f3ade06 Mon Sep 17 00:00:00 2001 From: Eric Duminil <eric.duminil@gmail.com> Date: Mon, 17 Jun 2024 13:42:48 +0200 Subject: [PATCH] subprocess.run should now also work on Linux --- download_files_from_LGL_BW.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/download_files_from_LGL_BW.py b/download_files_from_LGL_BW.py index 210ad61..d9f325e 100644 --- a/download_files_from_LGL_BW.py +++ b/download_files_from_LGL_BW.py @@ -113,12 +113,12 @@ def extract_region(output_dir: Path, location_name: str, wkt: str) -> None: print(f" Extracting {output_file}.") region_chooser_libs = Path(SIMSTADT_FOLDER).expanduser() / 'lib/*' gml_inputs = output_dir.glob(GML_GLOB) - result = subprocess.run(' '.join(['java', '-classpath', f'"{region_chooser_libs}"', - 'eu.simstadt.regionchooser.RegionChooserCLI', - '--input', ','.join(str(gml) for gml in gml_inputs), - '--output', str(output_file), - '--wkt', '-', - ]), + result = subprocess.run(['java', '-classpath', f'{region_chooser_libs}', + 'eu.simstadt.regionchooser.RegionChooserCLI', + '--input', ','.join(str(gml) for gml in gml_inputs), + '--output', str(output_file), + '--wkt', '-', + ], input=wkt, text=True, capture_output=True -- GitLab