]> git.openstreetmap.org Git - nominatim.git/commitdiff
Fixed ci-tests, osm-file flag
authorRobbe Haesendonck <googleit@inuits.eu>
Mon, 25 Sep 2023 09:14:14 +0000 (11:14 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 7 Dec 2023 08:04:33 +0000 (09:04 +0100)
Preparing database should work without osm-file

.github/workflows/ci-tests.yml
nominatim/clicmd/setup.py

index aac2141d8219c46c57814812c890ac06f8b12cba..767b5bfc63edc14aa051dd6eceb70d6bc845e44e 100644 (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
 
index 61552b3dcd832c5876074be7d4a3469d68839154..4df14bc519608f0281cea6ea8f1b60fe11d07934 100644 (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')