mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 08:43:42 +02:00
Prevent exception with search text.
This commit is contained in:
parent
1a10ff20ad
commit
0a9ddcda0c
1 changed files with 2 additions and 0 deletions
|
|
@ -240,6 +240,8 @@ def books_added(self, num):
|
|||
self.count_changed()
|
||||
|
||||
def clean_search_text(self, text):
|
||||
if not text:
|
||||
return text
|
||||
tokens = text.split(' ')
|
||||
for i, token in enumerate(tokens):
|
||||
if token.strip().endswith(':') or token.strip() == '':
|
||||
|
|
|
|||
Loading…
Reference in a new issue