Fixed ci-tests, osm-file flag

Preparing database should work without osm-file
This commit is contained in:
Robbe Haesendonck 2023-09-25 11:14:14 +02:00 committed by Sarah Hoffmann
parent 279b4fd6d2
commit e7b8e1a2c2
2 changed files with 5 additions and 3 deletions

View File

@ -307,7 +307,7 @@ jobs:
- name: Import
run: |
nominatim import --prepare-database --osm-file ../test.pbf
nominatim import --prepare-database
nominatim import --no-superuser --osm-file ../test.pbf
working-directory: /home/nominatim/nominatim-project

View File

@ -82,11 +82,13 @@ class SetupAll:
if args.continue_at is None:
files = args.get_osm_file_list()
if not files:
if not files and not args.only_prepare_database:
raise UsageError("No input files (use --osm-file).")
if args.only_import_data and args.only_prepare_database:
raise UsageError("Cannot use --no-superuser and --prepare-database together.")
raise UsageError(
"Cannot use --only-import-data and --only-prepare-database together."
)
if args.only_prepare_database or self._is_complete_import(args):
LOG.warning('Creating database')