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:
Johnny Robeson 2016-06-26 04:06:29 -04:00
parent a8b039da78
commit ce88a78de7

View file

@ -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.