mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Searching on the device: Ignore unicode errors
This commit is contained in:
parent
4018a811cb
commit
bf8324b622
@ -903,9 +903,14 @@ class OnDeviceSearch(SearchQueryParser):
|
|||||||
locations[i] = q[v]
|
locations[i] = q[v]
|
||||||
for i, r in enumerate(self.model.db):
|
for i, r in enumerate(self.model.db):
|
||||||
for loc in locations:
|
for loc in locations:
|
||||||
if query in loc(r):
|
try:
|
||||||
matches.add(i)
|
if query in loc(r):
|
||||||
break
|
matches.add(i)
|
||||||
|
break
|
||||||
|
except ValueError: # Unicode errors
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
pass
|
||||||
return matches
|
return matches
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user