]> git.openstreetmap.org Git - nominatim.git/commitdiff
Fixed typechecking error
authorRobbe Haesendonck <googleit@inuits.eu>
Thu, 23 Nov 2023 10:25:49 +0000 (11:25 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 7 Dec 2023 08:04:33 +0000 (09:04 +0100)
nominatim/clicmd/setup.py

index d4b5777ed8525b1f4da07ec59b1db9905d8c2fe9..ca3bf40ed3116ffe7890518511e449b401f1575e 100644 (file)
@@ -92,19 +92,18 @@ class SetupAll:
             )
 
 
+        if args.prepare_database or args.continue_at is None:
+            LOG.warning('Creating database')
+            database_import.setup_database_skeleton(args.config.get_libpq_dsn(),
+                                                        rouser=args.config.DATABASE_WEBUSER)
+            if args.prepare_database:
+                return 0
 
         if args.continue_at in (None, 'import-from-file'):
             files = args.get_osm_file_list()
             if not files and not args.prepare_database:
                 raise UsageError("No input files (use --osm-file).")
 
-            if args.prepare_database or args.continue_at is None:
-                LOG.warning('Creating database')
-                database_import.setup_database_skeleton(args.config.get_libpq_dsn(),
-                                                        rouser=args.config.DATABASE_WEBUSER)
-                if args.prepare_database:
-                    return 0
-
             if args.continue_at in ('import-from-file', None):
                 # Check if the correct plugins are installed
                 database_import.check_existing_database_plugins(args.config.get_libpq_dsn())