]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/clicmd/setup.py
Added missing return types to functions
[nominatim.git] / nominatim / clicmd / setup.py
index f9298aacc46ec392a868c77e042af109720b25e3..d4b5777ed8525b1f4da07ec59b1db9905d8c2fe9 100644 (file)
@@ -71,7 +71,7 @@ class SetupAll:
                             help='Create the database but do not import any data')
 
 
-    def run(self, args: NominatimArgs) -> int: # pylint: disable=too-many-statements
+    def run(self, args: NominatimArgs) -> int: # pylint: disable=too-many-statements, too-many-branches
         from ..data import country_info
         from ..tools import database_import, refresh, postcodes, freeze
         from ..indexer.indexer import Indexer
@@ -102,7 +102,8 @@ class SetupAll:
                 LOG.warning('Creating database')
                 database_import.setup_database_skeleton(args.config.get_libpq_dsn(),
                                                         rouser=args.config.DATABASE_WEBUSER)
-                return 0
+                if args.prepare_database:
+                    return 0
 
             if args.continue_at in ('import-from-file', None):
                 # Check if the correct plugins are installed