mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
...
This commit is contained in:
parent
982b3b20c9
commit
5f3d3b2ef8
@ -1771,7 +1771,10 @@ class DeviceMixin(object): # {{{
|
|||||||
string_pat = re.compile(r'(?u)\W|[_]')
|
string_pat = re.compile(r'(?u)\W|[_]')
|
||||||
|
|
||||||
def clean_string(x):
|
def clean_string(x):
|
||||||
x = x.lower() if x else ''
|
try:
|
||||||
|
x = x.lower() if x else ''
|
||||||
|
except Exception:
|
||||||
|
x = ''
|
||||||
return string_pat.sub('', x)
|
return string_pat.sub('', x)
|
||||||
|
|
||||||
update_metadata = (
|
update_metadata = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user