[core] improvement: do not perform the search if the normalized input is blank

This commit is contained in:
Vinicius Moreira
2022-05-02 15:23:42 -03:00
parent c0fde3686d
commit 4e509bb084

View File

@@ -159,6 +159,7 @@ class GenericSoftwareManager(SoftwareManager, SettingsController):
norm_query = sanitize_command_input(words).lower() norm_query = sanitize_command_input(words).lower()
self.logger.info(f"Search query: {norm_query}") self.logger.info(f"Search query: {norm_query}")
if norm_query:
is_url = bool(RE_IS_URL.match(norm_query)) is_url = bool(RE_IS_URL.match(norm_query))
disk_loader = self.disk_loader_factory.new() disk_loader = self.disk_loader_factory.new()
disk_loader.start() disk_loader.start()