mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
catch UnicodeDecodeError exception
This commit is contained in:
parent
07e888f764
commit
9f01f0b126
@ -15,7 +15,10 @@ from calibre.utils.logging import default_log
|
|||||||
from calibre.ptempfile import TemporaryFile
|
from calibre.ptempfile import TemporaryFile
|
||||||
|
|
||||||
def _clean(s):
|
def _clean(s):
|
||||||
|
try:
|
||||||
return s.replace(u'\u00a0', u' ')
|
return s.replace(u'\u00a0', u' ')
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
return u""
|
||||||
|
|
||||||
def _detag(tag):
|
def _detag(tag):
|
||||||
str = u""
|
str = u""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user