mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
Use object.setattr in BaseAlbum __init__ method.
BaseAlbum needs to use object.setattr in its __init__ method, because it overrides __setattr__.
This commit is contained in:
parent
c15c3ee9ec
commit
95a456acfc
1 changed files with 4 additions and 2 deletions
|
|
@ -766,8 +766,10 @@ class BaseAlbum(object):
|
|||
album-level metadata or use distinct backing stores.
|
||||
"""
|
||||
def __init__(self, library, record):
|
||||
self._library = library
|
||||
self._record = record
|
||||
# Need to use object.__setattr__ here, since we're overriding
|
||||
# it for this class
|
||||
object.__setattr__(self, '_library', library)
|
||||
object.__setattr__(self, '_record', record)
|
||||
|
||||
def __getattr__(self, key):
|
||||
"""Get the value for an album attribute."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue