mirror of
https://github.com/beetbox/beets.git
synced 2026-01-03 22:42:44 +01:00
fix error when regex-querying path & artpath
This commit is contained in:
parent
3de2b7f090
commit
a907d629a2
1 changed files with 3 additions and 1 deletions
|
|
@ -469,10 +469,12 @@ def str2bool(value):
|
|||
|
||||
def as_string(value):
|
||||
"""Convert a value to a Unicode object for matching with a query.
|
||||
None becomes the empty string.
|
||||
None becomes the empty string. Bytestrings are silently decoded.
|
||||
"""
|
||||
if value is None:
|
||||
return u''
|
||||
elif isinstance(value, str):
|
||||
return value.decode('utf8', 'ignore')
|
||||
else:
|
||||
return unicode(value)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue