X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1bee151fe3ccfd21df1d809392d6eb52ce7925cb..38f467bae3d9a6128180367c0e46ffd0bcad0961:/nominatim/tokenizer/factory.py?ds=sidebyside diff --git a/nominatim/tokenizer/factory.py b/nominatim/tokenizer/factory.py index f5159fa0..d6bc5163 100644 --- a/nominatim/tokenizer/factory.py +++ b/nominatim/tokenizer/factory.py @@ -55,6 +55,7 @@ def create_tokenizer(config: Configuration, init_db: bool = True, module_name = config.TOKENIZER # Create the directory for the tokenizer data + assert config.project_dir is not None basedir = config.project_dir / 'tokenizer' if not basedir.exists(): basedir.mkdir() @@ -80,6 +81,7 @@ def get_tokenizer_for_db(config: Configuration) -> AbstractTokenizer: The function looks up the appropriate tokenizer in the database and initialises it. """ + assert config.project_dir is not None basedir = config.project_dir / 'tokenizer' if not basedir.is_dir(): # Directory will be repopulated by tokenizer below.