Added error logging on HTTP requests (if config.basic.logging is enabled)
This commit is contained in:
@@ -8,6 +8,7 @@ import sphinxapi
|
||||
|
||||
from aore.config import basic
|
||||
from aore.config import sphinx_conf
|
||||
from aore.miscutils.exceptions import FiasException
|
||||
from aore.miscutils.trigram import trigram
|
||||
from wordentry import WordEntry
|
||||
from wordvariation import VariationType
|
||||
@@ -143,6 +144,9 @@ class SphinxSearch:
|
||||
if basic.logging:
|
||||
logging.info("Sphinx time for {} = {}".format(text, elapsed_t))
|
||||
|
||||
if rs is None:
|
||||
raise FiasException("Cannot find sentence.")
|
||||
|
||||
results = []
|
||||
parsed_ids = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user