]> git.openstreetmap.org Git - nominatim.git/commitdiff
Test fixes
authorDarkshredder <srivastavayash58@gmail.com>
Mon, 8 Mar 2021 19:30:56 +0000 (01:00 +0530)
committerDarkshredder <srivastavayash58@gmail.com>
Mon, 8 Mar 2021 19:30:56 +0000 (01:00 +0530)
lib-php/admin/setup.php
nominatim/cli.py

index f81c0ca89e915925b1b1e0da30c9647771fec5e8..0b0084957d6ecef3081409ce3a6e21da7cb6cfb9 100644 (file)
@@ -161,7 +161,7 @@ if ($aCMDResult['load-data'] || $aCMDResult['all']) {
 if ($aCMDResult['import-tiger-data']) {
     $bDidSomething = true;
     $sTigerPath = getSetting('TIGER_DATA_PATH', CONST_InstallDir.'/tiger');
-    $oSetup->importTigerData($sTigerPath);
+    run((clone($oNominatimCmd))->addParams('transition', '--tiger-data', $sTigerPath));
 }
 
 if ($aCMDResult['calculate-postcodes'] || $aCMDResult['all']) {
index b3d9eee6d735742ef61941379a00ca5477930d68..7459711f9b43dd1c8e370c209d14e6c38989fa6d 100644 (file)
@@ -13,7 +13,6 @@ from .tools.exec_utils import run_legacy_script, run_php_server
 from .errors import UsageError
 from . import clicmd
 from .clicmd.args import NominatimArgs
-from .tools import tiger_data
 
 LOG = logging.getLogger()
 
@@ -167,11 +166,8 @@ class UpdateAddData:
     @staticmethod
     def run(args):
         if args.tiger_data:
-            return tiger_data.add_tiger_data(args.config.get_libpq_dsn(),
-                                             args.tiger_data,
-                                             args.threads or 1,
-                                             args.config,
-                                             args.sqllib_dir)
+            os.environ['NOMINATIM_TIGER_DATA_PATH'] = args.tiger_data
+            return run_legacy_script('setup.php', '--import-tiger-data', nominatim_env=args)
 
         params = ['update.php']
         if args.file: