mirror of
https://github.com/beetbox/beets.git
synced 2026-01-18 22:22:18 +01:00
actually fix unicode-path-query exception
I mistakenly assumed that the value sent to _regexp from SQLite would be a str object. It's a buffer object, of course. This change explicitly converts to a str before doing the decoding.
This commit is contained in:
parent
1662f34528
commit
4a0513ccd5
1 changed files with 2 additions and 0 deletions
|
|
@ -473,6 +473,8 @@ def as_string(value):
|
|||
"""
|
||||
if value is None:
|
||||
return u''
|
||||
elif isinstance(value, buffer):
|
||||
return str(value).decode('utf8', 'ignore')
|
||||
elif isinstance(value, str):
|
||||
return value.decode('utf8', 'ignore')
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue