X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/71249bd94a1bd698a937983663f06a9376629ae6..3742fa2929619a4c54a50d3e79e0eeadb4d6ca6f:/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 7744595b..1edff174 100644 --- a/src/nominatim_db/clicmd/admin.py +++ b/src/nominatim_db/clicmd/admin.py @@ -12,7 +12,7 @@ import argparse import random from ..errors import UsageError -from ..db.connection import connect +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 = []