Log when there are no results for symbol search.
This commit is contained in:
parent
d3931310a2
commit
a3709926e4
1 changed files with 3 additions and 0 deletions
|
@ -65,6 +65,9 @@ class BaseSource(ABC):
|
|||
if (symbols := self.search(query)) is None:
|
||||
logging.error(f"Symbol search is not possible for the {self.id()} source.")
|
||||
exit(1)
|
||||
elif symbols == []:
|
||||
logging.info(f"No results found for query '{query}'.")
|
||||
return ""
|
||||
else:
|
||||
width = max([len(sym) for sym, desc in symbols] + [0])
|
||||
lines = [sym.ljust(width + 4) + desc + "\n" for sym, desc in symbols]
|
||||
|
|
Loading…
Add table
Reference in a new issue