This commit is contained in:
Kovid Goyal 2020-02-06 06:37:34 +05:30
parent 982b3b20c9
commit 5f3d3b2ef8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1771,7 +1771,10 @@ class DeviceMixin(object): # {{{
string_pat = re.compile(r'(?u)\W|[_]')
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)
update_metadata = (