Remove deprecated import

This commit is contained in:
Kovid Goyal 2023-05-15 12:44:57 +05:30
parent 57794b179f
commit dc8be3bbcd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -8,7 +8,6 @@ Backend that implements storage of ebooks in an sqlite database.
import datetime
import re
import sqlite3 as sqlite
import sre_constants
from zlib import compress, decompress
from calibre import isbytestring
@ -1515,7 +1514,7 @@ def text_to_tokens(text):
for i in tokens:
try:
ans.append(SearchToken(i))
except sre_constants.error:
except re.error:
continue
return ans, OR