From adefff10dd067974d4c8fc38faa77be389dd0cb7 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 18 Feb 2011 11:30:01 -0800 Subject: [PATCH] use super() instead of hard-coding superclass name --- beets/library.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/beets/library.py b/beets/library.py index 823f10b9e..4267ee78a 100644 --- a/beets/library.py +++ b/beets/library.py @@ -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.