X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/de724aa57646cad725162bdae56a5a6320cb8ce9..7cf9d459d6ccb91d7efdce13d5b33d331e47c127:/nominatim/admin/exec_utils.py diff --git a/nominatim/admin/exec_utils.py b/nominatim/admin/exec_utils.py index f3f59dea..01582279 100644 --- a/nominatim/admin/exec_utils.py +++ b/nominatim/admin/exec_utils.py @@ -21,9 +21,7 @@ def run_legacy_script(script, *args, nominatim_env=None, throw_on_fail=False): if not env['NOMINATIM_OSM2PGSQL_BINARY']: env['NOMINATIM_OSM2PGSQL_BINARY'] = nominatim_env.osm2pgsql_path - proc = subprocess.run(cmd, cwd=str(nominatim_env.project_dir), env=env) - - if throw_on_fail: - proc.check_returncode() + proc = subprocess.run(cmd, cwd=str(nominatim_env.project_dir), env=env, + check=throw_on_fail) return proc.returncode