mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
use check parameter of subprocess.run
...instead of checking on our own. Also increase required version of Python to 3.5 because of subprocess.run().
This commit is contained in:
@@ -61,7 +61,7 @@ endif()
|
|||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
if (BUILD_IMPORTER)
|
if (BUILD_IMPORTER)
|
||||||
find_package(PythonInterp 3)
|
find_package(PythonInterp 3.5 REQUIRED)
|
||||||
|
|
||||||
find_program(PYOSMIUM pyosmium-get-changes)
|
find_program(PYOSMIUM pyosmium-get-changes)
|
||||||
if (NOT EXISTS "${PYOSMIUM}")
|
if (NOT EXISTS "${PYOSMIUM}")
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ For running Nominatim:
|
|||||||
|
|
||||||
* [PostgreSQL](https://www.postgresql.org) (9.3+)
|
* [PostgreSQL](https://www.postgresql.org) (9.3+)
|
||||||
* [PostGIS](https://postgis.net) (2.2+)
|
* [PostGIS](https://postgis.net) (2.2+)
|
||||||
* [Python 3](https://www.python.org/) (3.4+)
|
* [Python 3](https://www.python.org/) (3.5+)
|
||||||
* [Psycopg2](https://www.psycopg.org)
|
* [Psycopg2](https://www.psycopg.org)
|
||||||
* [PHP](https://php.net) (7.0 or later)
|
* [PHP](https://php.net) (7.0 or later)
|
||||||
* PHP-pgsql
|
* PHP-pgsql
|
||||||
|
|||||||
@@ -21,9 +21,7 @@ def run_legacy_script(script, *args, nominatim_env=None, throw_on_fail=False):
|
|||||||
if not env['NOMINATIM_OSM2PGSQL_BINARY']:
|
if not env['NOMINATIM_OSM2PGSQL_BINARY']:
|
||||||
env['NOMINATIM_OSM2PGSQL_BINARY'] = nominatim_env.osm2pgsql_path
|
env['NOMINATIM_OSM2PGSQL_BINARY'] = nominatim_env.osm2pgsql_path
|
||||||
|
|
||||||
proc = subprocess.run(cmd, cwd=str(nominatim_env.project_dir), env=env)
|
proc = subprocess.run(cmd, cwd=str(nominatim_env.project_dir), env=env,
|
||||||
|
check=throw_on_fail)
|
||||||
if throw_on_fail:
|
|
||||||
proc.check_returncode()
|
|
||||||
|
|
||||||
return proc.returncode
|
return proc.returncode
|
||||||
|
|||||||
Reference in New Issue
Block a user