X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5d302a03a6ed9250b7a280a9bdd0c7e7a9bb2222..72be143cef05bf77655cebbfb0f82b8d3426872e:/src/nominatim_db/clicmd/admin.py?ds=sidebyside diff --git a/src/nominatim_db/clicmd/admin.py b/src/nominatim_db/clicmd/admin.py index 7b97557d..1edff174 100644 --- a/src/nominatim_db/clicmd/admin.py +++ b/src/nominatim_db/clicmd/admin.py @@ -11,8 +11,8 @@ import logging import argparse import random -from nominatim_core.errors import UsageError -from nominatim_core.db.connection import connect +from ..errors import UsageError +from ..db.connection import connect, table_exists from .args import NominatimArgs # Do not repeat documentation of subcommand classes. @@ -115,7 +115,7 @@ class AdminFuncs: tokenizer = tokenizer_factory.get_tokenizer_for_db(args.config) with connect(args.config.get_libpq_dsn()) as conn: - if conn.table_exists('search_name'): + if table_exists(conn, 'search_name'): words = tokenizer.most_frequent_words(conn, 1000) else: words = []