mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-29 00:33:23 +02:00
Searching on the device: Ignore unicode errors
This commit is contained in:
parent
4018a811cb
commit
bf8324b622
1 changed files with 8 additions and 3 deletions
|
|
@ -903,9 +903,14 @@ def get_matches(self, location, query):
|
|||
locations[i] = q[v]
|
||||
for i, r in enumerate(self.model.db):
|
||||
for loc in locations:
|
||||
if query in loc(r):
|
||||
matches.add(i)
|
||||
break
|
||||
try:
|
||||
if query in loc(r):
|
||||
matches.add(i)
|
||||
break
|
||||
except ValueError: # Unicode errors
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
pass
|
||||
return matches
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue