mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -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|[_]')
|
||||
|
||||
def clean_string(x):
|
||||
try:
|
||||
x = x.lower() if x else ''
|
||||
except Exception:
|
||||
x = ''
|
||||
return string_pat.sub('', x)
|
||||
|
||||
update_metadata = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user