From 95a456acfc5be7ff03fec0f1ba32c101c03280a4 Mon Sep 17 00:00:00 2001 From: Ozzi Lee Date: Tue, 1 Feb 2011 22:08:09 -0600 Subject: [PATCH] Use object.setattr in BaseAlbum __init__ method. BaseAlbum needs to use object.setattr in its __init__ method, because it overrides __setattr__. --- beets/library.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/beets/library.py b/beets/library.py index 25f019040..b70b7d3c4 100644 --- a/beets/library.py +++ b/beets/library.py @@ -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."""