mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 20:42:37 +01:00
add a __bytes__ method to LibModel
this allows `test_album_and_item_format` in test_library to pass in py3
This commit is contained in:
parent
a8b039da78
commit
ce88a78de7
1 changed files with 3 additions and 0 deletions
|
|
@ -349,6 +349,9 @@ class LibModel(dbcore.Model):
|
|||
def __str__(self):
|
||||
return format(self)
|
||||
|
||||
def __bytes__(self):
|
||||
return self.__str__().encode('utf-8')
|
||||
|
||||
|
||||
class FormattedItemMapping(dbcore.db.FormattedMapping):
|
||||
"""Add lookup for album-level fields.
|
||||
|
|
|
|||
Loading…
Reference in a new issue