From 2bd5fdf4bdf2a07d78e11bafba99f78de2f30e50 Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Mon, 6 Mar 2023 23:20:35 +0100 Subject: [PATCH] rhodecode_tools: don't fail on missing package. It's optional --- rhodecode/lib/index/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rhodecode/lib/index/__init__.py b/rhodecode/lib/index/__init__.py index 13686c67..cbd8b8cd 100644 --- a/rhodecode/lib/index/__init__.py +++ b/rhodecode/lib/index/__init__.py @@ -38,8 +38,11 @@ ES_VERSION_6 = '6' # for legacy reasons we keep 2 compat as default DEFAULT_ES_VERSION = ES_VERSION_2 -from rhodecode_tools.lib.fts_index.elasticsearch_engine_6 import \ - ES_CONFIG # pragma: no cover +try: + from rhodecode_tools.lib.fts_index.elasticsearch_engine_6 import ES_CONFIG # pragma: no cover +except ImportError: + log.warning('rhodecode_tools not available, use of full text search is limited') + pass class BaseSearcher(object):