mirror of
https://github.com/beetbox/beets.git
synced 2025-12-22 16:43:25 +01:00
use super() instead of hard-coding superclass name
This commit is contained in:
parent
56964c7faa
commit
adefff10dd
1 changed files with 3 additions and 5 deletions
|
|
@ -766,10 +766,8 @@ class BaseAlbum(object):
|
|||
album-level metadata or use distinct backing stores.
|
||||
"""
|
||||
def __init__(self, library, 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)
|
||||
super(BaseAlbum, self).__setattr__('_library', library)
|
||||
super(BaseAlbum, self).__setattr__('_record', record)
|
||||
|
||||
def __getattr__(self, key):
|
||||
"""Get the value for an album attribute."""
|
||||
|
|
@ -793,7 +791,7 @@ class BaseAlbum(object):
|
|||
setattr(item, key, value)
|
||||
self._library.store(item)
|
||||
else:
|
||||
object.__setattr__(self, key, value)
|
||||
super(BaseAlbum, self).__setattr__(key, value)
|
||||
|
||||
def load(self):
|
||||
"""Refresh this album's cached metadata from the library.
|
||||
|
|
|
|||
Loading…
Reference in a new issue